### Question:
IovisorResolvedEndpointListener extends DataTreeChangeHandler<IovisorResolvedEndpointsByTenantByEndpointgroupId> { @VisibleForTesting void endpointPolicyUpdated(TenantId tenantId, EndpointGroupId epgId, WriteTransaction wTx) { FollowedEndpointGroup followedEpg = new FollowedEndpointGroupBuilder().setId(epgId).build(); wTx.put(LogicalDatastoreType.OPERATIONAL, IidFactory.followedEndpointgroupIid(IovisorRenderer.RENDERER_NAME, tenantId, epgId), followedEpg, true); if (DataStoreHelper.submitToDs(wTx)) { LOG.info("IovisorRenderer following Tenant {} EndpointGroup {}", tenantId.getValue(), epgId.getValue()); return; } else { LOG.error("IovisorRenderer could not follow Tenant {} EndpointGroup {}", tenantId.getValue(), epgId.getValue()); return; } } protected  IovisorResolvedEndpointListener(DataBroker dataprovider);   }### Answer:
@Test public void endpointPolicyUpdatedTest() { iovisorResolvedEndpointListener.endpointPolicyUpdated(tenant1, epg1, dataBroker.newWriteOnlyTransaction()); Optional<FollowedEndpointGroup> readFromDs = DataStoreHelper.readFromDs(LogicalDatastoreType.OPERATIONAL, IidFactory.followedEndpointgroupIid(IovisorRenderer.RENDERER_NAME, tenant1, epg1), dataBroker.newReadOnlyTransaction()); Assert.assertTrue(readFromDs.isPresent()); Assert.assertEquals(epg1, readFromDs.get().getId()); }