Neo4jManager neo4j = new Neo4jManager( db.getManagementBean( Kernel.class ) );
HighAvailability ha = neo4j.getHighAvailabilityBean();
InstanceInfo[] instances = ha.getInstancesInCluster();
assertNotNull( instances );
assertEquals( 1, instances.length );
InstanceInfo instance = instances[0];
assertNotNull( instance );
Pair<Neo4jManager, HighAvailability> proc = instance.connect();
assertNotNull( "could not connect", proc );
neo4j = proc.first();
ha = proc.other();
assertNotNull( neo4j );
assertNotNull( ha );
instances = ha.getInstancesInCluster();
assertNotNull( instances );
assertEquals( 1, instances.length );
assertEquals( instance.getAddress(), instances[0].getAddress() );
assertEquals( instance.getInstanceId(), instances[0].getInstanceId() );
}