### Question:
NamingServiceResources { public String deleteInstanceGroupName(InstanceGroup instanceGroup) throws BadResponseException, IOException { Deleteelement deleteElement = namingRequestObjectBuilder.deleteElementMapper(instanceGroup.getId()); List<Deleteelement> deleteElements = new ArrayList<>(); deleteElements.add(deleteElement); return (namingClient .deleteNameGenRequest(namingRequestObjectBuilder.nameGenDeleteRequestMapper(deleteElements))); }  String generateInstanceGroupName(InstanceGroup instanceGroup, String policyInstanceName, String nfNamingCode); String deleteInstanceGroupName(InstanceGroup instanceGroup); String generateServiceInstanceName(NamingRequestObject namingRequestObject); String deleteServiceInstanceName(NamingRequestObject namingRequestObject);  }### Answer:
@Test public void deleteInstanceGroupNameTest() throws Exception { NameGenDeleteResponse name = new NameGenDeleteResponse(); ResponseEntity<NameGenDeleteResponse> resp = new ResponseEntity<>(name, null, HttpStatus.OK); Deleteelement deleteElement = new Deleteelement(); deleteElement.setExternalKey(instanceGroup.getId()); NameGenDeleteRequest req = new NameGenDeleteRequest(); doReturn(deleteElement).when(MOCK_namingRequestObjectBuilder).deleteElementMapper(isA(String.class)); doReturn("").when(MOCK_namingClient).deleteNameGenRequest(isA(NameGenDeleteRequest.class)); doReturn(req).when(MOCK_namingRequestObjectBuilder).nameGenDeleteRequestMapper(isA(List.class)); namingServiceResources.deleteInstanceGroupName(instanceGroup); verify(MOCK_namingClient, times(1)).deleteNameGenRequest(any(NameGenDeleteRequest.class)); }