### Question:
OfOverlayAug implements EpRendererAugmentation, AutoCloseable { @Override public Map.Entry<Class<? extends Augmentation<Endpoint>>, Augmentation<Endpoint>> buildEndpointAugmentation( RegisterEndpointInput input) { OfOverlayContextBuilder ictx = checkAugmentation(input); if (ictx != null) { return new SimpleImmutableEntry<Class<? extends Augmentation<Endpoint>>, Augmentation<Endpoint>>( OfOverlayContext.class, ictx.build()); } return null; } OfOverlayAug(DataBroker dataProvider, EpRendererAugmentationRegistry epRendererAugmentationRegistry); @Override Map.Entry<Class<? extends Augmentation<Endpoint>>, Augmentation<Endpoint>> buildEndpointAugmentation(
            RegisterEndpointInput input); @Override Map.Entry<Class<? extends Augmentation<EndpointL3>>, Augmentation<EndpointL3>> buildEndpointL3Augmentation(
            RegisterEndpointInput input); @Override Map.Entry<Class<? extends Augmentation<EndpointL3Prefix>>, Augmentation<EndpointL3Prefix>> buildL3PrefixEndpointAugmentation(
            RegisterL3PrefixEndpointInput input); @Override void close();  }### Answer:
@SuppressWarnings("unchecked") @Test public void testBuildEndpointAugmentation() throws ExecutionException, InterruptedException { Nodes nodes = buildNodes(); ReadOnlyTransaction roTx = mock(ReadOnlyTransaction.class); TransactionMockUtils.setupRoTx(roTx, LogicalDatastoreType.OPERATIONAL, InstanceIdentifier.builder(Nodes.class).build(), true, nodes); when(dataProvider.newReadOnlyTransaction()).thenReturn(roTx); OfOverlayContextInput contextInput = new OfOverlayContextInputBuilder().setPortName(new Name(PORT_NAME)).build(); RegisterEndpointInput input = new RegisterEndpointInputBuilder().addAugmentation(OfOverlayContextInput.class, contextInput).build(); Map.Entry<Class<? extends Augmentation<Endpoint>>, Augmentation<Endpoint>> entry = ofOverlayAug.buildEndpointAugmentation(input); assertNotNull(entry); assertNotNull(entry.getValue()); }
@Test public void testBuildEndpointAugmentation_null() { RegisterEndpointInput input = new RegisterEndpointInputBuilder().build(); Map.Entry<Class<? extends Augmentation<Endpoint>>, Augmentation<Endpoint>> entry = ofOverlayAug.buildEndpointAugmentation(input); assertNull(entry); }