### Question:
CommandRestController { @GetMapping("commands") public List<JsonClientMapping> get(Principal principal) { auditLog.info("[{}] Request to list all Commands which have a registered handler.", AuditLog.username(principal)); return registrationCache.getAll().entrySet().stream().map(JsonClientMapping::from).collect(Collectors.toList()); } CommandRestController(CommandDispatcher commandDispatcher, CommandRegistrationCache registrationCache); @GetMapping("/components/{component}/commands") Iterable<ComponentCommand> getByComponent(@PathVariable("component") String component, @RequestParam("context") String context, Principal principal); @GetMapping("commands") List<JsonClientMapping> get(Principal principal); @PostMapping("commands/run") @ApiImplicitParams({ @ApiImplicitParam(name = TOKEN_PARAM, value = "Access Token", required = false, dataType = "string", paramType = "header") }) Future<CommandResponseJson> execute(@RequestHeader(value = CONTEXT_PARAM, defaultValue = Topology.DEFAULT_CONTEXT, required = false) String context,
                                               @RequestBody @Valid CommandRequestJson command, Principal principal); @GetMapping("commands/queues") List<JsonQueueInfo> queues(Principal principal); @GetMapping("commands/count") int count(Principal principal);  }### Answer:
@Test public void get() throws Exception { List<CommandRestController.JsonClientMapping> commands = testSubject.get(null); ObjectMapper mapper = new ObjectMapper(); assertNotEquals("[]", mapper.writeValueAsString(commands)); }