when(repository.createUid(anyString())).thenReturn(uid);
when(repository.getAttributesHandler()).thenReturn(mock(AttributesHandler.class));
final DefaultLocalStorageContext localStorageContext = new DefaultLocalStorageContext(null);
when(repository.getLocalStorageContext()).thenReturn(localStorageContext);
FSPeer fsPeer = mock(FSPeer.class);
MimeSupport mimeSupport = mock(MimeSupport.class);
when(mimeSupport.guessMimeTypeFromPath(Mockito.any(MimeRulesSource.class), Mockito.anyString()))
.thenReturn("text/plain");
// mock file
File mockFile = mock(File.class);
when(mockFile.isDirectory()).thenReturn(false);