Iterables.getOnlyElement(response.getResult().getGetLocksResult().getLocks()));
}
@Test
public void testGetQuota() throws Exception {
QuotaInfo infoMock = createMock(QuotaInfo.class);
expect(quotaManager.getQuotaInfo(ROLE)).andReturn(infoMock);
expect(infoMock.getQuota()).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(