### Question:
OFOverlayRenderer implements AutoCloseable, DataTreeChangeListener<OfOverlayConfig> { private ListenableFuture<List<Void>> applyConfig(@Nonnull OfOverlayConfig config) { List<ListenableFuture<Void>> configFutures = new ArrayList<>(); switchManager.setEncapsulationFormat(config.getEncapsulationFormat()); endpointManager.setLearningMode(config.getLearningMode()); policyManager.setLearningMode(config.getLearningMode()); if (config.getGbpOfoverlayTableOffset() != null) { configFutures.add(policyManager.changeOpenFlowTableOffset(config.getGbpOfoverlayTableOffset())); } return Futures.allAsList(configFutures); } OFOverlayRenderer(final DataBroker dataProvider,
            PacketProcessingService packetProcessingService,
            SalFlowService flowService,
            NotificationService notificationService,
            EpRendererAugmentationRegistry epRendererAugmentationRegistry,
            PolicyValidatorRegistry policyValidatorRegistry,
            StatisticsManager statisticsManager,
            final short tableOffset); ScheduledExecutorService getExecutor(); @Override void close(); @Override void onDataTreeChanged(Collection<DataTreeModification<OfOverlayConfig>> changes); static final RendererName RENDERER_NAME; }### Answer:
@Test public void applyConfigTest() throws Exception { OfOverlayConfig config = mock(OfOverlayConfig.class); when(config.getGbpOfoverlayTableOffset()).thenReturn(null); Method method = OFOverlayRenderer.class.getDeclaredMethod("applyConfig",OfOverlayConfig.class); method.setAccessible(true); method.invoke(renderer, config); verify(config).getEncapsulationFormat(); verify(config, times(2)).getLearningMode(); }