public void testAttributes1() throws Exception
{
checkResource(ObjectNameBuilder.DEFAULT.getClusterConnectionObjectName(clusterConnectionConfig1.getName()));
ClusterConnectionControl clusterConnectionControl = createManagementControl(clusterConnectionConfig1.getName());
Assert.assertEquals(clusterConnectionConfig1.getName(), clusterConnectionControl.getName());
Assert.assertEquals(clusterConnectionConfig1.getAddress(), clusterConnectionControl.getAddress());
Assert.assertEquals(clusterConnectionConfig1.getDiscoveryGroupName(),
clusterConnectionControl.getDiscoveryGroupName());
Assert.assertEquals(clusterConnectionConfig1.getRetryInterval(), clusterConnectionControl.getRetryInterval());
Assert.assertEquals(clusterConnectionConfig1.isDuplicateDetection(),
clusterConnectionControl.isDuplicateDetection());
Assert.assertEquals(clusterConnectionConfig1.isForwardWhenNoConsumers(),
clusterConnectionControl.isForwardWhenNoConsumers());
Assert.assertEquals(clusterConnectionConfig1.getMaxHops(), clusterConnectionControl.getMaxHops());
Object[] connectorPairs = clusterConnectionControl.getStaticConnectorNamePairs();
Assert.assertEquals(1, connectorPairs.length);
Object[] connectorPairData = (Object[])connectorPairs[0];
Assert.assertEquals(clusterConnectionConfig1.getStaticConnectorNamePairs().get(0).a, connectorPairData[0]);
Assert.assertEquals(clusterConnectionConfig1.getStaticConnectorNamePairs().get(0).b, connectorPairData[1]);
String jsonString = clusterConnectionControl.getStaticConnectorNamePairsAsJSON();
Assert.assertNotNull(jsonString);
JSONArray array = new JSONArray(jsonString);
Assert.assertEquals(1, array.length());
JSONObject data = array.getJSONObject(0);
Assert.assertEquals(clusterConnectionConfig1.getStaticConnectorNamePairs().get(0).a, data.optString("a"));
Assert.assertEquals(clusterConnectionConfig1.getStaticConnectorNamePairs().get(0).b, data.optString("b", null));
Assert.assertNull(clusterConnectionControl.getDiscoveryGroupName());
Assert.assertTrue(clusterConnectionControl.isStarted());
}