### Question:
AdminHealth implements SystemHealth { @Override public SystemHealthState getHealth () { boolean healthyState = AdminState.getHealthyStates().contains(adminManager.getAdminState()); boolean longTimeInState = adminManager.getTimeInState().getSeconds() > 60 * 5; return (!healthyState) && longTimeInState ? SystemHealthState.ERROR : SystemHealthState.OK; } @Autowired  AdminHealth(); @Override SystemHealthState getHealth();  }### Answer:
@Test public void getHealth () { Mockito.doReturn(AdminState.STARTED).when(adminManager).getAdminState(); doReturn(Duration.ZERO).when(adminManager).getTimeInState(); Assert.assertEquals(SystemHealthState.OK, adminHealth.getHealth()); }