@Test
public void testWriteResourceFileShouldWriteInputStreamToOutputStream() throws IOException {

    //GIVEN
    given(fileReader.readFile(FILE_NAME, path)).willReturn(inputStream);
    given(response.getOutputStream()).willReturn(outputStream);
    given(inputStream.read(Mockito.any(byte[].class))).willReturn(1, -1);
    //WHEN
    underTest.writeResourceFile(response, PATH_INFO, path);
    //THEN
    verify(outputStream).write(Mockito.any(byte[].class), Mockito.eq(0), Mockito.eq(1));
}