@Test
public void test_getWorkloadDetails() throws Exception {

    String responseMessage = "[{\"appName\":\"app1\",\"appTag\":\"app1\",\"appID\":\"app\"},{\"appName\":\"app2\",\"appTag\":\"app2\",\"appID\":\"ap2\"}]";
    ResponseEntity<String> responseEntityExpected = ResponseEntity.status(HttpStatus.OK).body(responseMessage);
    when(workloadDetailsService.getWorkloadDetails("5PDrOhsy4ig8L3EpsJZSLAMg", userDetails)).thenReturn(responseEntityExpected);
    mockMvc.perform(MockMvcRequestBuilders.get("/v2/serviceaccounts/cwm/approles")
            .requestAttr("UserDetails", userDetails)
            .header("vault-token", token)
            .header("Content-Type", "application/json;charset=UTF-8"))
            .andExpect(status().isOk())
            .andExpect(content().string(containsString(responseMessage)));
}