@Test
public void test_isAuthorized_failure_400_() {

    UserDetails userDetails = getMockUser(false);
    String path = "users/safe1";
    ResponseEntity<String> responseEntityExpected = ResponseEntity.status(HttpStatus.BAD_REQUEST).body("{\"errors\":[\"Invalid path specified\"]}");
    when(ControllerUtil.isPathValid(path)).thenReturn(true);
    when(ControllerUtil.getSafeType(path)).thenReturn("users");
    when(ControllerUtil.getSafeName(path)).thenReturn("");
    ResponseEntity<String> responseEntity = selfSupportService.isAuthorized(userDetails, path);
    assertEquals(HttpStatus.BAD_REQUEST, responseEntity.getStatusCode());
    assertEquals(responseEntityExpected, responseEntity);
}