### Question:
SupervisorGroupAPIController { @RequestMapping(value = "/group/{groupId}/supervisor/remove/{applyToAll}", method = RequestMethod.DELETE, produces = MediaType.APPLICATION_JSON_VALUE) @ResponseBody public AcmGroup removeSupervisorFromGroup(@PathVariable("groupId") String groupId, @PathVariable("applyToAll") boolean applyToAll) throws AcmUserActionFailedException { groupId = new String(Base64.getUrlDecoder().decode(groupId.getBytes())); LOG.info("Removing supervisor from the group with ID = [{}]", groupId); return groupService.removeSupervisor(groupId, applyToAll); }  @RequestMapping(value = "/group/{groupId}/supervisor/save/{applyToAll}", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) @ResponseBody AcmGroup addSupervisorToGroup(@RequestBody AcmUser supervisor,
            @PathVariable("groupId") String groupId,
            @PathVariable("applyToAll") boolean applyToAll); @RequestMapping(value = "/group/{groupId}/supervisor/remove/{applyToAll}", method = RequestMethod.DELETE, produces = MediaType.APPLICATION_JSON_VALUE) @ResponseBody AcmGroup removeSupervisorFromGroup(@PathVariable("groupId") String groupId,
            @PathVariable("applyToAll") boolean applyToAll); void setGroupService(GroupService groupService);  }### Answer:
@Test public void removeSupervisorFromGroupTest() throws Exception { AcmGroup group = new AcmGroup(); group.setName("A"); expect(groupService.removeSupervisor("A", false)).andReturn(group); expect(mockAuthentication.getName()).andReturn("ann-acm"); replayAll(); MvcResult result = mockMvc.perform( delete("/api/latest/users/group/" + Base64.getUrlEncoder().encodeToString(group.getName().getBytes()) + "/supervisor/remove/false") .accept(MediaType.APPLICATION_JSON) .contentType(MediaType.APPLICATION_JSON) .principal(mockAuthentication)) .andReturn(); log.info("Results: {}", result.getResponse().getContentAsString()); verifyAll(); ObjectMapper objectMapper = new ObjectMapper(); AcmGroup resultGroup = objectMapper.readValue(result.getResponse().getContentAsString(), AcmGroup.class); assertEquals(HttpStatus.OK.value(), result.getResponse().getStatus()); assertEquals(null, resultGroup.getSupervisor()); }