### Question:
SxpMapperReactorImpl implements SxpMapperReactor { @Override public ListenableFuture<RpcResult<Void>> processTemplatesAndSxpMasterDB( final EndpointPolicyTemplateBySgt epPolicyTemplate, final EndpointForwardingTemplateBySubnet epForwardingTemplate, final MasterDatabaseBinding masterDBBinding) { LOG.debug("processing ep-templates + sxpMasterDB entry: {} - {}", masterDBBinding.getSecurityGroupTag(), masterDBBinding.getIpPrefix()); final Ipv4Prefix address = new Ipv4Prefix(epForwardingTemplate.getIpPrefix().getIpv4Prefix().getValue()); final NetworkContainment networkContainment = new NetworkContainmentBuilder() .setContainment(new NetworkDomainContainmentBuilder() .setNetworkDomainType(epForwardingTemplate.getNetworkContainment().getNetworkDomainType()) .setNetworkDomainId(epForwardingTemplate.getNetworkContainment().getNetworkDomainId()) .build()) .build(); final RegisterEndpointInput epInput = new RegisterEndpointInputBuilder().setAddressEndpointReg( Collections.singletonList(new AddressEndpointRegBuilder().setAddressType(IpPrefixType.class) .setAddress(address.getValue()) .setContextType(L3Context.class) .setContextId(epForwardingTemplate.getL3Context()) .setNetworkContainment(networkContainment) .setCondition(epPolicyTemplate.getConditions()) .setTenant(epPolicyTemplate.getTenant()) .setEndpointGroup(epPolicyTemplate.getEndpointGroups()) .build())) .build(); epForwardingTemplate.getL3Context(); return chainL3EPServiceIfEpAbsent(epInput); } SxpMapperReactorImpl(final BaseEndpointService l3EndpointService, final DataBroker dataBroker); @Override ListenableFuture<RpcResult<Void>> processTemplatesAndSxpMasterDB(
            final EndpointPolicyTemplateBySgt epPolicyTemplate,
            final EndpointForwardingTemplateBySubnet epForwardingTemplate,
            final MasterDatabaseBinding masterDBBinding);  }### Answer:
@Test public void testProcessTemplatesAndSxpMasterDB() throws Exception { Mockito.when(epForwardingTemplate.getIpPrefix()).thenReturn(IP_PREFIX); sxpMapperReactor.processTemplatesAndSxpMasterDB(epPolicyTemplate, epForwardingTemplate, masterDBBinding); Mockito.verify(l3EndpointService).registerEndpoint(Matchers.<RegisterEndpointInput>any()); }