### Question:
DisableAppService { public boolean isDisabled(final String appName) { return regCenter.isExisted(DisableAppNode.getDisableAppNodePath(appName)); } DisableAppService(final CoordinatorRegistryCenter regCenter); void add(final String appName); void remove(final String appName); boolean isDisabled(final String appName);  }### Answer:
@Test public void assertIsDisabled() { Mockito.when(regCenter.isExisted("/state/disable/app/test_app")).thenReturn(true); Assert.assertTrue(disableAppService.isDisabled("test_app")); Mockito.verify(regCenter).isExisted("/state/disable/app/test_app"); }
@Test public void assertIsEnabled() { Mockito.when(regCenter.isExisted("/state/disable/app/test_app")).thenReturn(false); Assert.assertFalse(disableAppService.isDisabled("test_app")); Mockito.verify(regCenter).isExisted("/state/disable/app/test_app"); }
@Test public void assertIsDisabled() { when(regCenter.isExisted("/state/disable/app/test_app")).thenReturn(true); assertTrue(disableAppService.isDisabled("test_app")); verify(regCenter).isExisted("/state/disable/app/test_app"); }
@Test public void assertIsEnabled() { when(regCenter.isExisted("/state/disable/app/test_app")).thenReturn(false); assertFalse(disableAppService.isDisabled("test_app")); verify(regCenter).isExisted("/state/disable/app/test_app"); }