public void testGetQuota() throws Exception {
QuotaInfo infoMock = createMock(QuotaInfo.class);
expect(quotaManager.getQuotaInfo(ROLE)).andReturn(infoMock);
expect(infoMock.guota()).andReturn(QUOTA);
expect(infoMock.getProdConsumption()).andReturn(CONSUMED);
IResourceAggregate nonProdConsumed = IResourceAggregate.build(new ResourceAggregate(1, 0, 0));
expect(infoMock.getNonProdConsumption()).andReturn(nonProdConsumed);
control.replay();
Response response = assertOkResponse(thrift.getQuota(ROLE));
assertEquals(QUOTA.newBuilder(), response.getResult().getGetQuotaResult().getQuota());
assertEquals(
CONSUMED.newBuilder(),
response.getResult().getGetQuotaResult().getProdConsumption());
assertEquals(
nonProdConsumed.newBuilder(),
response.getResult().getGetQuotaResult().getNonProdConsumption());
}