### Question:
RemoteExecutionDiscoveryService implements DiscoveryServiceClient, DiscoveryService { @Override public ServiceDiscovered discover(String name) { for (ProgramType programType : ProgramType.values()) { if (programType.isDiscoverable() && name.startsWith(programType.getDiscoverableTypeName() + ".")) { return new DefaultServiceDiscovered(name); } } DefaultServiceDiscovered serviceDiscovered = services.get(name); String key = Constants.RuntimeMonitor.DISCOVERY_SERVICE_PREFIX + name; while (serviceDiscovered == null) { serviceDiscovered = new DefaultServiceDiscovered(name); synchronized (this) { updateServiceDiscovered(serviceDiscovered, cConf, key); services.putIfAbsent(name, serviceDiscovered); } serviceDiscovered = services.get(name); } return serviceDiscovered; } @Inject  RemoteExecutionDiscoveryService(CConfiguration cConf, RuntimeMonitorType monitorType); @Override synchronized Cancellable register(Discoverable discoverable); @Override ServiceDiscovered discover(String name);  }### Answer:
@Test public void testAppDisabled() { CConfiguration cConf = CConfiguration.create(); RemoteExecutionDiscoveryService discoveryService = new RemoteExecutionDiscoveryService(cConf, RuntimeMonitorType.SSH); String name = ServiceDiscoverable.getName(NamespaceId.DEFAULT.app("test").service("service")); Discoverable discoverable = new RandomEndpointStrategy(() -> discoveryService.discover(name)) .pick(1, TimeUnit.SECONDS); Assert.assertNull(discoverable); }