AuthenticationServiceClient extends AbstractClient { public UserInfo getMe() { UserInfo userInfo = get(baseUri, ME, UserInfo.class); return userInfo; } AuthenticationServiceClient(String baseUri);  AuthenticationServiceClient(String baseUri, Boolean saveState); String getBearerToken(Credentials credentials); String getBearerTokenForConnectedApp(ConnectedAppCredentials connectedApp); UserInfo getMe(); List<Organization> getOrganizations(); List<Environment> getEnvironments(String organizationId); static final String AUTHORIZATION_HEADER; static final String ANYPOINT_SEESION_EXTEND; static final String LOGIN; static final String BASE; static final String TOKEN; static final String ME; static final String ORGANIZATIONS; static final String ENVIRONMENTS; }
@Test public void getMe() { client.getBearerToken(credentials); UserInfo userInfo = client.getMe(); System.out.println(userInfo.user.organization.id); System.out.println(userInfo.user.organization.name); }