### Question:
HttpProvisionerRequestService implements ProvisionerRequestService { @Override public boolean putTenant(Provisioner provisioner, String tenantId, ResourceCollection resourceCollection) { HttpPut put = new HttpPut(getTenantURL(provisioner, tenantId)); int workers = provisioner.getAssignedWorkers(tenantId); try { String body = gson.toJson(new ProvisionerTenant(workers, resourceCollection)); put.setEntity(new StringEntity(body)); } catch (UnsupportedEncodingException e) { LOG.error("Unsupported encoding when writing tenant {} to provisioner {}", tenantId, provisioner.getId()); Throwables.propagate(e); } return makeRequestWithRetries(put); } @Inject private  HttpProvisionerRequestService(Configuration conf, Gson gson); @Override boolean deleteTenant(Provisioner provisioner, String tenantId); @Override boolean putTenant(Provisioner provisioner, String tenantId, ResourceCollection resourceCollection); @Override boolean putTenantWorkers(Provisioner provisioner, String tenantId); @Override boolean putTenantResources(Provisioner provisioner, String tenantId, ResourceCollection resourceCollection);  }### Answer:
@Test public void testPutTenant() { Provisioner provisioner = new Provisioner("id", host, port, 100, null, null); for (int i = 0; i < 10; i++) { provisionerRequestService.putTenantWorkers(provisioner, "tenant" + i % 5); provisionerRequestService.putTenant(provisioner, "tenant" + i % 5, new ResourceCollection()); provisionerRequestService.putTenantResources(provisioner, "tenant" + i % 5, new ResourceCollection()); } for (int i = 0; i < 5; i++) { Assert.assertEquals(2, stubProvisioner.getPutCount("tenant" + i)); Assert.assertEquals(2, stubProvisioner.getPutResourcesCount("tenant" + i)); Assert.assertEquals(2, stubProvisioner.getPutWorkersCount("tenant" + i)); } }