Calendar c = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
Date end = c.getTime();
c.add(Calendar.MONTH, -1);
Date start = c.getTime();
JobResult result = globalAdminClient.getUsageClient().generateUsageRecords(start, end, GenerateUsageRecordsOptions.NONE);
assertNotNull(result);
assertTrue(result.isSuccess(), result.getDisplayText());
Set<UsageRecord> records = globalAdminClient.getUsageClient().listUsageRecords(start, end, ListUsageRecordsOptions.NONE);
assertNotNull(records);
assertTrue(records.size() >= 0);
}