@Ignore("Fail. Requires an active emulator to install the selendroid apk.")
  @Test
  public void testShouldBeAbleToStartSelendroid() throws Exception {
    IDevice device = mock(IDevice.class);
    when(device.getSerialNumber()).thenReturn(serial);
    AndroidDevice emulator = new DefaultHardwareDevice(device);
    Assert.assertTrue(emulator.isDeviceReady());
    cleanUpDevice(emulator);

    // install apps
    emulator.install(selendroidServer);
    emulator.install(aut);
    String installedAPKs = listInstalledPackages();
    Assert.assertTrue(installedAPKs.contains(SELENDROID_SERVER_PACKAGE));
    Assert.assertTrue(installedAPKs.contains(AUT_PACKAGE));

    // start selendroid
    emulator.startSelendroid(aut, port, new SelendroidCapabilities());
    String url = "http://localhost:" + port + "/wd/hub/status";
    HttpResponse response = HttpClientUtil.executeRequest(url, HttpMethod.GET);
    SelendroidAssert.assertResponseIsOk(response);
    Assert.assertTrue(emulator.isSelendroidRunning());
  }
Works only if - android_home and java_home are set and - if one emulator is already running - and
selendroid project is build (apks are existent)

@author ddary
selendroid-standalone/src/test/java/io/selendroid/standalone/android/impl/DefaultHardwareDeviceTests.java