* one OFPP_LOCAL to another OFPP_LOCAL port.
* @throws Exception
*/
@Test
public void testLOCALAttachmentPointLearning() throws Exception {
ITopologyService mockTopology = createMock(ITopologyService.class);
expect(mockTopology.getL2DomainId(anyLong())).
andReturn(1L).anyTimes();
expect(mockTopology.isAttachmentPointPort(anyLong(), anyShort())).
andReturn(true).anyTimes();
expect(mockTopology.isBroadcastDomainPort(1L, (short)1)).
andReturn(false).anyTimes();
expect(mockTopology.isBroadcastDomainPort(1L, OFPort.OFPP_LOCAL.getValue())).
andReturn(false).anyTimes();
expect(mockTopology.isBroadcastDomainPort(1L, (short)2)).
andReturn(true).anyTimes();
expect(mockTopology.isInSameBroadcastDomain(1L, (short)1,
1L, OFPort.OFPP_LOCAL.getValue())).andReturn(true).anyTimes();
expect(mockTopology.isInSameBroadcastDomain(1L, OFPort.OFPP_LOCAL.getValue(),
1L, (short)2)).andReturn(true).anyTimes();
expect(mockTopology.isInSameBroadcastDomain(1L, (short)2,
1L, OFPort.OFPP_LOCAL.getValue())).andReturn(true).anyTimes();
expect(mockTopology.isConsistent(anyLong(), anyShort(), anyLong(), anyShort())).andReturn(false).anyTimes();
Date topologyUpdateTime = new Date();
expect(mockTopology.getLastUpdateTime()).andReturn(topologyUpdateTime).
anyTimes();
replay(mockTopology);
deviceManager.topology = mockTopology;