@Test
public void testAttachmentPointFlappingTwoCluster() throws Exception {
Calendar c = Calendar.getInstance();
ITopologyService mockTopology = createMock(ITopologyService.class);
expect(mockTopology.isAttachmentPointPort(anyLong(),
anyShort())).andReturn(true).anyTimes();
expect(mockTopology.isBroadcastDomainPort(anyLong(),
anyShort())).
andReturn(false).anyTimes();
expect(mockTopology.isInSameBroadcastDomain(anyLong(), anyShort(),
anyLong(), anyShort())).andReturn(false).anyTimes();
expect(mockTopology.getL2DomainId(1L)).
andReturn(1L).anyTimes();
expect(mockTopology.getL2DomainId(5L)).
andReturn(5L).anyTimes();
expect(mockTopology.isConsistent(1L, (short)1, 1L, (short)2)).
andReturn(false).anyTimes();
expect(mockTopology.isConsistent(1L, (short)2, 5L, (short)1)).
andReturn(false).anyTimes();
expect(mockTopology.isConsistent(5L, (short)1, 5L, (short)2)).
andReturn(false).anyTimes();
expect(mockTopology.isConsistent(1L, (short)2, 1L, (short)1)).
andReturn(false).anyTimes();
expect(mockTopology.isConsistent(1L, (short)1, 5L, (short)1)).
andReturn(false).anyTimes();
expect(mockTopology.isConsistent(1L, (short)1, 5L, (short)2)).
andReturn(false).anyTimes();
expect(mockTopology.isConsistent(5L, (short)2, 5L, (short)1)).
andReturn(false).anyTimes();
Date topologyUpdateTime = new Date();
expect(mockTopology.getLastUpdateTime()).andReturn(topologyUpdateTime).
anyTimes();
replay(mockTopology);
deviceManager.topology = mockTopology;