@Test
public void testWriteWhenFileIsInPackageShouldCreateFolderStructure() throws IOException {

    //GIVEN
    String directories = "com/epam/wilma";
    given(file.getParent()).willReturn(directories);
    given(fileOutputStreamFactory.createFileOutputStream(file)).willReturn(fileOutputStream);
    //WHEN
    underTest.write(inputStream, FILE_NAME, EXCEPTION_MESSAGE);
    //THEN
    verify(fileFactory.createFile(directories)).mkdirs();
}