@Test
public void test_readAppRoleBasicDetails_successfully() throws Exception{

    String token = "5PDrOhsy4ig8L3EpsJZSLAMg";
    String role_name = "testapprole01";
    ArrayList<String> policiesList = new ArrayList<String>();
    policiesList.add("r_shared_safe01");
    String[] policies = policiesList.toArray(new String[policiesList.size()]);
    
    AppRole appRoleExpected = new AppRole(role_name, policies, true, 0, 0, 0);
    
    String responseJson = new ObjectMapper().writeValueAsString(appRoleExpected);
    Response response = getMockResponse(HttpStatus.OK, true, responseJson);
    
    Map<String, Object> responseMap = new HashMap<>();
    Map<String, Object> dataMap = new HashMap<>();
    responseMap.put("data", dataMap);
    dataMap.put("policies",policiesList);
    dataMap.put("bind_secret_id",new Boolean(true));
    dataMap.put("secret_id_num_uses", new Integer(0));
    dataMap.put("secret_id_ttl", new Integer(0));
    dataMap.put("token_num_uses", new Integer(0));
    dataMap.put("token_ttl", new Integer(0));
    dataMap.put("token_max_ttl", new Integer(0));
    
    when(ControllerUtil.parseJson(responseJson)).thenReturn(responseMap);
    
    when(reqProcessor.process("/auth/approle/role/read", "{\"role_name\":\""+role_name+"\"}",token)).thenReturn(response);
    AppRole approleActual = appRoleService.readAppRoleBasicDetails(token, role_name);
    assertNotNull(approleActual);
    assertNotNull(approleActual.getRole_name());
    assertEquals(role_name, approleActual.getRole_name());
}