when(mockFile.isFile()).thenReturn(true);
when(mockFile.exists()).thenReturn(true);
// needs to throw a FileNotFound when _opening_ the file
LinkPersister linkPersister = mock(LinkPersister.class);
when(linkPersister.isLinkContent(Mockito.any(ContentLocator.class)))
.thenThrow(new FileNotFoundException("Expected to be thrown from mock."));
// object to test
DefaultFSLocalRepositoryStorage localRepositoryStorageUnderTest = new DefaultFSLocalRepositoryStorage(wastebasket,
linkPersister, mimeSupport, fsPeer);