import static org.mockito.Matchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.neutron.gbp.mapper.rev150513.mappings.gbp.by.neutron.mappings.endpoints.by.ports.EndpointByPort;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.neutron.gbp.mapper.rev150513.mappings.gbp.by.neutron.mappings.endpoints.by.ports.EndpointByPort;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
when(optionalEp.isPresent()).thenReturn(true);
EndpointByPort epByPort = mock(EndpointByPort.class);
when(optionalEp.get()).thenReturn(epByPort);
when(epByPort.getL2Context()).thenReturn(mock(L2BridgeDomainId.class));
when(epByPort.getMacAddress()).thenReturn(mock(MacAddress.class));
when(optionalEp.isPresent()).thenReturn(true);
EndpointByPort epByPort = mock(EndpointByPort.class);
when(optionalEp.get()).thenReturn(epByPort);
when(epByPort.getL2Context()).thenReturn(mock(L2BridgeDomainId.class));
when(epByPort.getMacAddress()).thenReturn(mock(MacAddress.class));