@Test
public void test_getVaultTokenLookupDetails_successfully() throws TVaultValidationException, IOException {

    String token = "7QPMPIGiyDFlJkrK3jFykUqa";
    Response response = getMockResponse(HttpStatus.OK, true, "{\"id\":\"7DXvbGXxu81LC724cRrrqYyq\",\"last_renewal_time\":null,\"renewable\":false,\"policies\":[\"default\"],\"creation_ttl\":0,\"username\":null}");
    VaultTokenLookupDetails expectedLookupDetails = new VaultTokenLookupDetails();
    expectedLookupDetails.setAdmin(false);
    expectedLookupDetails.setValid(true);
    expectedLookupDetails.setToken(token);
    expectedLookupDetails.setUsername(null);
    String [] policies = {"default"};
    ArrayList<String> adminPolicies = new ArrayList<>();
    adminPolicies.add("adminpolicy");
    expectedLookupDetails.setPolicies(policies);
    when(reqProcessor.process("/auth/tvault/lookup","{}", token)).thenReturn(response);
    when(commonUtils.getPoliciesAsArray(Mockito.any(), eq(response.getResponse()))).thenReturn(policies);
    when(policyUtils.getAdminPolicies()).thenReturn(adminPolicies);
    when(authorizationUtils.containsAdminPolicies(Mockito.anyList(),  Mockito.anyList())).thenReturn(true);
    VaultTokenLookupDetails lookupDetails = tokenValidator.getVaultTokenLookupDetails(token);
    assertEquals(JSONUtil.getJSON(expectedLookupDetails), JSONUtil.getJSON(lookupDetails));
}