@Test(expectedExceptions = DescriptorCannotBeParsedException.class)
public final void testBuildStubDescriptorShouldThrowExceptionWhenDocumentBuildingFails() throws Exception {

    //GIVEN
    given(xmlDocumentBuilder.buildDocument(inputStream, schema)).willThrow(documentBuilderException);
    //WHEN
    underTest.buildStubDescriptor(inputStream);
    //THEN exception thrown
}