### Question:
DestinationMapperUtils { L3Context getL3ContextForSubnet(IndexedTenant indexedTenant, Subnet subnet) { if (indexedTenant == null || subnet == null || subnet.getParent() == null) { return null; } return indexedTenant.resolveL3Context(new L2FloodDomainId(subnet.getParent().getValue())); } DestinationMapperUtils(OfContext ctx);   }### Answer:
@Test public void getL3ContextForSubnet_nullTenant() { SubnetBuilder subnetBuilder = new SubnetBuilder(); subnetBuilder.setId(new SubnetId(SUBNET_2)); L3Context l3Context = utils.getL3ContextForSubnet(null, subnetBuilder.build()); assertNull(l3Context); }
@Test public void getL3ContextForSubnet_nullResult() { SubnetBuilder subnetBuilder = new SubnetBuilder(); subnetBuilder.setId(new SubnetId("otherSubnet")); L3Context l3Context = utils.getL3ContextForSubnet(getTestIndexedTenant(), subnetBuilder.build()); assertNull(l3Context); }
@Test public void getL3ContextForSubnet_l3Context() { SubnetBuilder subnetBuilder = new SubnetBuilder(); subnetBuilder.setId(SUBNET_0); subnetBuilder.setParent(L2FD_ID); L3ContextBuilder expectedL3Context = new L3ContextBuilder(); expectedL3Context.setId(new L3ContextId(L3C_ID)); L3Context l3Context = utils.getL3ContextForSubnet(getTestIndexedTenant(), subnetBuilder.build()); assertEquals(l3Context, expectedL3Context.build()); }