@Test
public void test_removeUserFromServiceAccount_failure_notauthorized() {

erDetails userDetails = getMockUser(false);
	String token = userDetails.getClientToken();
	ServiceAccountUser serviceAccountUser = new ServiceAccountUser("testacc02", "testacc01", "read");
    try {
        List<String> resList = new ArrayList<>();
        resList.add("default");
        resList.add("o_svcacct_testacc02");
        when(ControllerUtil.getPoliciesAsListFromJson(any(), any())).thenReturn(resList);
    } catch (IOException e) {
        e.printStackTrace();
    }
    when(tokenUtils.getSelfServiceToken()).thenReturn(token);
    // System under test
    String expectedResponse = "{\"errors\":[\"Access denied: No permission to remove user from this service account\"]}";
    ResponseEntity<String> responseEntityExpected = ResponseEntity.status(HttpStatus.BAD_REQUEST).body(expectedResponse);
    when(reqProcessor.process(eq("/sdb"),Mockito.any(),eq(token))).thenReturn(getMockResponse(HttpStatus.OK, true, "{\"data\":{\"initialPasswordReset\":true,\"managedBy\":\"smohan11\",\"name\":\"svc_vault_test5\",\"users\":{\"smohan11\":\"sudo\"}}}"));
    ResponseEntity<String> responseEntity = serviceAccountsService.removeUserFromServiceAccount(token, serviceAccountUser, userDetails);
    assertEquals(HttpStatus.BAD_REQUEST, responseEntity.getStatusCode());
    assertEquals(responseEntityExpected, responseEntity);
}