@Test
public void testServiceDependencies() {

  Thread thread = new Thread() {
    @Override
    public void run() {
      Service service = createExampleApplication();
      Component compa = createComponent("compa");
      Component compb = createComponent("compb");
      service.addComponent(compa);
      service.addComponent(compb);
      List<String> dependencies = new ArrayList<String>();
      dependencies.add("abc");
      service.setDependencies(dependencies);
      Service dependent = createExampleApplication();
      dependent.setState(ServiceState.STOPPED);
      ServiceApiUtil.checkServiceDependencySatisified(service);
    }
  };
  thread.start();
  try {
    Thread.sleep(1000);
  } catch (InterruptedException e) {
  }
  Assert.assertTrue(thread.isAlive());
}