+ @Test
+ public void disruptiveVersionGetsNotification() {
+ setupFetchResult(createDisruptiveVersionFetchResult());
+ setupCallbackWithEdition(MAX_VALUE, true, false);
+ verifyAFreenetUriIsFetched();
+ verifyEventIsFired(new Version(1, 2, 3), 1289417883000L, true);
+ verifyThatUpdateCheckerKnowsLatestVersion(new Version(1, 2, 3), 1289417883000L);
+ }
+
+ private FetchResult createDisruptiveVersionFetchResult() {
+ ClientMetadata clientMetadata = new ClientMetadata("application/xml");
+ Bucket fetched = new ArrayBucket(("# MapConfigurationBackendVersion=1\n" +
+ "CurrentVersion/Version: 1.2.3\n" +
+ "CurrentVersion/ReleaseTime: 1289417883000\n" +
+ "DisruptiveVersion/1.2.3: true").getBytes());
+ return new FetchResult(clientMetadata, fetched);
+ }
+