/**
   * Setup the service dependencies of deployer and other required services.
   *
   * @throws Exception if setup fails
   */
  @Before
  public void setUp() throws Exception {
    AllTests.initServiceContext();

    URI deploymentURI = AllTests.getAbsoluteFixturePath().resolve("builder/sensor");

    CommandFactory cf = DeployerTest.createCommandFactory();
    sensorBuilder = new Version20SensorBuilder();
    cache = new StatusCache();

    deployer = DeployerTest.createDeployer(deploymentURI, cf, sensorBuilder, cache);

    ButtonBuilder bb = new ButtonBuilder();
    bb.setDeployer(deployer);
    bb.setCommandFactory(cf);

    Map<String, ComponentBuilder> cb = new HashMap<String, ComponentBuilder>();
    cb.put("button", bb);

    ComponentFactory cof = new ComponentFactory();
    cof.setComponentBuilders(cb);

    commandService = new ControlCommandServiceImpl(deployer, cof);

    deployer.softRestart();
  }
  @Before
  public void setUp() throws Exception {
    URI deploymentURI = AllTests.getAbsoluteFixturePath().resolve("builder/slider");

    CommandFactory cf = DeployerTest.createCommandFactory();

    deployer = DeployerTest.createDeployer(deploymentURI, cf);
    deployer.startController();

    sliderBuilder = new SliderBuilder();
    sliderBuilder.setDeployer(deployer);
    sliderBuilder.setCommandFactory(cf);
  }