- public void exceptionWhileFetchingAnUnknownSoneDoesNotUpdateCore() {
- FreenetURI finalRequestUri = requestUri.sskForUSK()
- .setMetaString(new String[] { "sone.xml" });
- setupSoneAsUnknown();
- when(freenetInterface.fetchUri(finalRequestUri)).thenThrow(NullPointerException.class);
- try {
- soneDownloader.fetchSoneAction(sone).run();
- } finally {
- verify(freenetInterface).fetchUri(finalRequestUri);
- verifyThatSoneStatusWasChangedToDownloadingAndBackTo(unknown);
- verify(core, never()).updateSone(any(Sone.class));
- }
- }
-
- @Test(expected = NullPointerException.class)
- public void exceptionWhileFetchingAKnownSoneDoesNotUpdateCore() {
- FreenetURI finalRequestUri = requestUri.sskForUSK()
- .setMetaString(new String[] { "sone.xml" });
- when(freenetInterface.fetchUri(finalRequestUri)).thenThrow( NullPointerException.class);
+ public void exceptionWhileFetchingSoneDoesNotProcessUpdatedSone() {
+ when(freenetInterface.fetchUri(any(FreenetURI.class))).thenThrow(NullPointerException.class);