@Test
public void testDecompressShouldReturnWriter() throws IOException {

    //GIVEN
    given(outputStreamFactory.createByteArrayOutputStream()).willReturn(baos);
    given(gzipInputStreamFactory.createInputStream(source)).willReturn(gzipInputStream);
    given(gzipInputStream.read((byte[]) Mockito.any())).willReturn(1, -1);
    //WHEN
    ByteArrayOutputStream actual = underTest.decompress(source);
    //THEN
    assertEquals(actual, baos);
}