### Question:
NamingServiceResources { public String deleteServiceInstanceName(NamingRequestObject namingRequestObject) throws BadResponseException, IOException { HashMap<String, String> nsRequestObject = namingRequestObject.getNamingRequestObjectMap(); Deleteelement delElement = new Deleteelement(); nsRequestObject.forEach((k, v) -> delElement.setExternalKey(v)); List<Deleteelement> delElements = new ArrayList<>(); delElements.add(delElement); return (namingClient.deleteNameGenRequest(namingRequestObjectBuilder.nameGenDeleteRequestMapper(delElements))); }  String generateInstanceGroupName(InstanceGroup instanceGroup, String policyInstanceName, String nfNamingCode); String deleteInstanceGroupName(InstanceGroup instanceGroup); String generateServiceInstanceName(NamingRequestObject namingRequestObject); String deleteServiceInstanceName(NamingRequestObject namingRequestObject);  }### Answer:
@Test public void deleteServiceInstanceNameTest() throws Exception { NameGenDeleteRequest req = new NameGenDeleteRequest(); doReturn(req).when(MOCK_namingRequestObjectBuilder).nameGenDeleteRequestMapper(isA(List.class)); NamingRequestObject nrObject = new NamingRequestObject(); nrObject.setExternalKeyValue("testExternalKey"); nrObject.setNamingTypeValue(NamingServiceConstants.NAMING_TYPE_SERVICE); namingServiceResources.deleteServiceInstanceName(nrObject); verify(MOCK_namingClient, times(1)).deleteNameGenRequest(any(NameGenDeleteRequest.class)); }