@Test
public void testWriteShouldWriteFileToOutputStream() throws IOException {

    //GIVEN
    given(file.getParent()).willReturn(DIRECTORIES);
    given(fileOutputStreamFactory.createFileOutputStream(file)).willReturn(fileOutputStream);
    //WHEN
    underTest.write(inputStream, FILE_NAME, EXCEPTION_MESSAGE);
    //THEN
    verify(fileOutputStream).write(Mockito.any(byte[].class), Mockito.anyInt(), Mockito.anyInt());
}