@Test
public void testHasAnotherMaster() {

	URI cokeUri = URIUtil.createURI("1.2.3.4", 6653);
	InetSocketAddress address = (InetSocketAddress) sw.getConnection(OFAuxId.MAIN).getLocalInetAddress();
	URI pepsiUri = URIUtil.createURI(address.getHostName(), address.getPort());
	updateControllerConnections(sw, OFControllerRole.ROLE_SLAVE, OFBsnControllerConnectionState.BSN_CONTROLLER_CONNECTION_STATE_CONNECTED, cokeUri.toString(),
			OFControllerRole.ROLE_MASTER, OFBsnControllerConnectionState.BSN_CONTROLLER_CONNECTION_STATE_CONNECTED, pepsiUri.toString());
	// From the perspective of pepsi, the cluster currently does NOT have another master controller
	assertFalse(sw.hasAnotherMaster());
	// Switch the controller connections so that pepsi is no longer master
	updateControllerConnections(sw, OFControllerRole.ROLE_MASTER, OFBsnControllerConnectionState.BSN_CONTROLLER_CONNECTION_STATE_CONNECTED, cokeUri.toString(),
			OFControllerRole.ROLE_SLAVE, OFBsnControllerConnectionState.BSN_CONTROLLER_CONNECTION_STATE_CONNECTED, pepsiUri.toString());
	// From the perspective of pepsi, the cluster currently has another master controller
	assertTrue(sw.hasAnotherMaster());
}