@Test(expectedExceptions = SystemException.class)
public void testCompressShouldThrowSystemExceptionWhenIOExceptionIsCatched() throws ParserConfigurationException, SAXException, IOException {

    //GIVEN
    given(saxParserFactory.newSAXParser()).willReturn(saxParser);
    willThrow(new IOException()).given(saxParser).parse(inputStream, saxDocumentSerializer);
    //WHEN
    underTest.compress(inputStream);
    //THEN exception should be thrown
}