### Question:
NetworkService extends ServiceUtil { public static void writeDhcpClauseWithConsProvEic(TenantId tenantId, @Nullable IpPrefix ipPrefix, WriteTransaction writeTx) { Clause clause = createClauseWithConsProvEic(ipPrefix, DHCP_SUBJECT_NAME); writeTx.put(LogicalDatastoreType.CONFIGURATION, IidFactory.clauseIid(tenantId, DHCP_CONTRACT_ID, clause.getName()), clause, true); }  static void writeDhcpClauseWithConsProvEic(TenantId tenantId, @Nullable IpPrefix ipPrefix,
            WriteTransaction writeTx); static void writeDnsClauseWithConsProvEic(TenantId tenantId, @Nullable IpPrefix ipPrefix,
            WriteTransaction writeTx); static void writeMgmtClauseWithConsProvEic(TenantId tenantId, @Nullable IpPrefix ipPrefix,
            WriteTransaction writeTx); static void writeNetworkServiceEntitiesToTenant(TenantId tenantId, WriteTransaction writeTx); static Set<ClassifierInstance> getAllClassifierInstances(); static final ContractId DHCP_CONTRACT_ID; static final Contract DHCP_CONTRACT; static final ConsumerNamedSelector DHCP_CONTRACT_CONSUMER_SELECTOR; static final ContractId DNS_CONTRACT_ID; static final Contract DNS_CONTRACT; static final ConsumerNamedSelector DNS_CONTRACT_CONSUMER_SELECTOR; static final ContractId MGMT_CONTRACT_ID; static final Contract MGMT_CONTRACT; static final ConsumerNamedSelector MGMT_CONTRACT_CONSUMER_SELECTOR; static final EndpointGroupId EPG_ID; static final EndpointGroup EPG; }### Answer:
@Test public void testWriteDhcpClauseWithConsProvEicIpv4() throws Exception { DataBroker dataBroker = getDataBroker(); ReadWriteTransaction rwTx = dataBroker.newReadWriteTransaction(); NetworkService.writeDhcpClauseWithConsProvEic(new TenantId(tenantId), ipv4Prefix, rwTx); rwTx.submit().get(); String clauseNameIpV4 = DHCP_SUBJECT_NAME.getValue() + MappingUtils.NAME_DOUBLE_DELIMETER + ipv4Prefix.getIpv4Prefix().getValue(); clauseNameIpV4 = clauseNameIpV4.replace('/', '_'); PolicyAssert.assertClauseExists(dataBroker, tenantId, NetworkService.DHCP_CONTRACT_ID.getValue(), clauseNameIpV4); }
@Test public void testWriteDhcpClauseWithConsProvEicIpv6() throws Exception { DataBroker dataBroker = getDataBroker(); ReadWriteTransaction rwTx = dataBroker.newReadWriteTransaction(); NetworkService.writeDhcpClauseWithConsProvEic(new TenantId(tenantId), ipv6Prefix, rwTx); rwTx.submit().get(); String clauseNameIpV6 = DHCP_SUBJECT_NAME.getValue() + MappingUtils.NAME_DOUBLE_DELIMETER + ipv6Prefix.getIpv6Prefix().getValue(); clauseNameIpV6 = clauseNameIpV6.replace('/', '_').replace(':', '.'); PolicyAssert.assertClauseExists(dataBroker, tenantId, NetworkService.DHCP_CONTRACT_ID.getValue(), clauseNameIpV6); }