@Test
public void testXmlGatewayDescriptorStoreFailure() throws IOException {
GatewayDescriptor descriptor = GatewayDescriptorFactory.create()
.addResource().addFilter().param().up().up().up();
Console console = new Console();
try {
console.capture();
GatewayDescriptorFactory.store( descriptor, "xml", new BrokenWriter() );
fail( "Expected IOException" );
} catch( IOException e ) {
assertThat( e.getMessage(), containsString( "BROKEN" ) );
} finally {
console.release();
}
}