ExchangeClient extends AbstractClient { public String getGeneratedGroupId() { getBearerToken(metadata.getCredentials()); Response response = get(metadata.getBaseUri(), String.format(GROUPS_PATH, metadata.getOrganizationId())); checkResponseStatus(response); Type listType = new TypeToken<ArrayList<Group>>() {}.getType(); List<Group> groupList = new Gson().fromJson(response.readEntity(String.class), listType); return groupList.get(0).getGroupId(); } ExchangeClient(ExchangeRepositoryMetadata metadata); String getGeneratedGroupId();  }
@Test public void test() { client = new ExchangeClient(METADATA); client.getGeneratedGroupId(); }