File descriptor = new File( topoDir, "test-cluster.xml" );
FileOutputStream stream = new FileOutputStream( descriptor );
createTopology().toStream( stream );
stream.close();
DefaultGatewayServices srvcs = new DefaultGatewayServices();
Map<String,String> options = new HashMap<String,String>();
options.put( "persist-master", "false" );
options.put( "master", "password" );
try {
srvcs.init( testConfig, options );
} catch ( ServiceLifecycleException e ) {
e.printStackTrace(); // I18N not required.
}
gateway = GatewayServer.startGateway( testConfig, srvcs );
MatcherAssert.assertThat( "Failed to start gateway.", gateway, notNullValue() );