### Question:
Provisioner { public void removeTenantAssignments(String tenantId) { if (assignments.containsKey(tenantId)) { capacityFree += assignments.get(tenantId); assignments.remove(tenantId); } } Provisioner(String id, String host, Integer port, Integer capacityTotal, Map<String, Integer> usage,
                     Map<String, Integer> assignments); String getId(); String getHost(); int getPort(); int getCapacityTotal(); int getCapacityFree(); Map<String, Integer> getUsage(); Set<String> getAssignedTenants(); Set<String> getLiveTenants(); void removeTenantAssignments(String tenantId); int tryAddTenantAssignments(String tenantId, int numToAdd); int tryRemoveTenantAssignments(String tenantId, int numToRemove); int getAssignedWorkers(String tenantId); int getLiveWorkers(String tenantId); void setUsage(Map<String, Integer> usage); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testRemoveTenantAssignments() { Provisioner provisioner = new Provisioner( "id", "host", 12345, 100, ImmutableMap.<String, Integer>of("t1", 5, "t2", 10, "t3", 20), ImmutableMap.<String, Integer>of("t1", 5, "t2", 10, "t3", 25) ); Assert.assertEquals(60, provisioner.getCapacityFree()); Assert.assertEquals(ImmutableSet.of("t1", "t2", "t3"), ImmutableSet.copyOf(provisioner.getAssignedTenants())); provisioner.removeTenantAssignments("t1"); Assert.assertEquals(ImmutableSet.of("t2", "t3"), ImmutableSet.copyOf(provisioner.getAssignedTenants())); Assert.assertEquals(65, provisioner.getCapacityFree()); provisioner.removeTenantAssignments("t2"); Assert.assertEquals(ImmutableSet.of("t3"), ImmutableSet.copyOf(provisioner.getAssignedTenants())); Assert.assertEquals(75, provisioner.getCapacityFree()); provisioner.removeTenantAssignments("t3"); Assert.assertTrue(provisioner.getAssignedTenants().isEmpty()); Assert.assertEquals(100, provisioner.getCapacityFree()); }