@ApiOperation(value = "Get a single user", tags = { "Users" })
    @ApiResponses(value = {
            @ApiResponse(code = 200, message = "Indicates the user exists and is returned."),
            @ApiResponse(code = 404, message = "Indicates the requested user does not exist.")
    })
    @GetMapping(value = "/identity/users/{userId}", produces = "application/json")
    public UserResponse getUser(@ApiParam(name = "userId") @PathVariable String userId) {
        return restResponseFactory.createUserResponse(getUserFromRequest(userId), false);
    }
@Test
    public void testGetUser() throws Exception {
        User savedUser = null;
        try {
            User newUser = identityService.newUser("testuser");
            newUser.setFirstName("Fred");
            newUser.setLastName("McDonald");
            newUser.setDisplayName("Fred McDonald");
            newUser.setEmail("no-reply@flowable.org");
            identityService.saveUser(newUser);
            savedUser = newUser;

            CloseableHttpResponse response = executeRequest(
                    new HttpGet(SERVER_URL_PREFIX + RestUrls.createRelativeResourceUrl(RestUrls.URL_USER, newUser.getId())), HttpStatus.SC_OK);

            JsonNode responseNode = objectMapper.readTree(response.getEntity().getContent());
            closeResponse(response);
            assertThat(responseNode).isNotNull();
            assertThatJson(responseNode)
                    .when(Option.IGNORING_EXTRA_FIELDS)
                    .isEqualTo("{"
                            + "id: 'testuser',"
                            + "firstName: 'Fred',"
                            + "lastName: 'McDonald',"
                            + "displayName: 'Fred McDonald',"
                            + "email: 'no-reply@flowable.org',"
                            + "url: '" + SERVER_URL_PREFIX + RestUrls.createRelativeResourceUrl(RestUrls.URL_USER, newUser.getId()) + "'"
                            + "}");

        } finally {

            // Delete user after test passes or fails
            if (savedUser != null) {
                identityService.deleteUser(savedUser.getId());
            }
        }
    }