@Test(expectedExceptions = ResponseFormattingFailedException.class)
public void testGenerateResponseWhenSaxonApiExceptionDuringTransformShouldThrowException() throws SaxonApiException, SAXException {

    //GIVEN
    given(transformer.transform(xslInputStream, requestInputStream, templateInputStream)).willThrow(new SaxonApiException("exception"));
    //WHEN
    underTest.generateResponse(requestXml, xsl, templateXml);
    //THEN it should throw excpetion
}