### Question:
TenantAdminDatastore extends Datastore implements DatastoreHasUpdate<TenantAdminItem>, DatastoreHasGet<TenantAdminItem> { @Override public TenantAdminItem get(final APIID id) { final TenantAdminItem tenantAdminItem = new TenantAdminItem(); try { final boolean tenantPaused = getTenantManagementEngineClient().isTenantPaused(); tenantAdminItem.setIsPaused(tenantPaused); tenantAdminItem.setId(apiSession.getTenantId()); return tenantAdminItem; } catch (final Exception e) { throw new APIException(e); } } TenantAdminDatastore(final APISession apiSession); @Override TenantAdminItem update(final APIID unusedId, final Map<String, String> attributes); @Override TenantAdminItem get(final APIID id);  }### Answer:
@Test public void testGetTenantAvailable() throws Exception { when(tenantAdministrationAPI.isPaused()).thenReturn(false); final APIID apiid = APIID.makeAPIID(1L); final TenantAdminItem tenantAdminItem = tenantAdminDatastore.get(apiid); verify(tenantAdministrationAPI, times(1)).isPaused(); verify(tenantAdministrationAPI, times(0)).resume(); verify(tenantAdministrationAPI, times(0)).pause(); assertFalse(tenantAdminItem.isPaused()); }
@Test public void testGetTenantInMaintenance() throws Exception { when(tenantAdministrationAPI.isPaused()).thenReturn(true); final APIID apiid = APIID.makeAPIID(1L); final TenantAdminItem tenantAdminItem = tenantAdminDatastore.get(apiid); verify(tenantAdministrationAPI, times(1)).isPaused(); verify(tenantAdministrationAPI, times(0)).resume(); verify(tenantAdministrationAPI, times(0)).pause(); assertTrue(tenantAdminItem.isPaused()); }