@Test(expectedExceptions = SystemException.class)
public void testDecompressWhenInputStreamCloseThrowsIOExceptionShouldLogError() throws TransformerConfigurationException, IOException {

    //GIVEN
    StreamResult result = new StreamResult(new StringWriter());
    given(transformerFactory.createTransformer()).willReturn(transformer);
    given(fastInfosetSourceFactory.createFastInfosetSource(inputStream)).willReturn(fISource);
    willThrow(new IOException()).given(inputStream).close();
    given(streamResultFactory.createStreamResult()).willReturn(result);
    //WHEN
    underTest.decompress(inputStream);
    //THEN it should throw exception
}