public Map<AssociationStorageType, Long> getNumberOfAssociations(DatabaseTestClient databaseTestClient) {
Response response = null;
try {
response = databaseTestClient.getNumberOfAssociations( true );
if ( response.getStatus() == Response.Status.OK.getStatusCode() ) {
AssociationCountResponse countResponse = response.readEntity( AssociationCountResponse.class );
Map<AssociationStorageType, Long> countsByType = new HashMap<AssociationStorageType, Long>( 2 );
countsByType.put( AssociationStorageType.IN_ENTITY, countResponse.getInEntityAssociationCount() );
countsByType.put( AssociationStorageType.ASSOCIATION_DOCUMENT, countResponse.getAssociationDocumentCount() );
return countsByType;
}
else {
GenericResponse responseEntity = response.readEntity( GenericResponse.class );