public void doTest(Browser browserType) throws Exception {
    // Media Pipeline
    MediaPipeline mp = pipelineFactory.create();
    PlayerEndpoint playerRed =
        mp.newPlayerEndpoint("http://files.kurento.org/video/60sec/red.webm").build();
    PlayerEndpoint playerGreen =
        mp.newPlayerEndpoint("http://files.kurento.org/video/60sec/green.webm").build();
    PlayerEndpoint playerBlue =
        mp.newPlayerEndpoint("http://files.kurento.org/video/60sec/blue.webm").build();
    PlayerEndpoint playerWhite =
        mp.newPlayerEndpoint("http://files.kurento.org/video/60sec/white.webm").build();

    Composite composite = mp.newComposite().build();
    HubPort hubPort1 = composite.newHubPort().build();
    HubPort hubPort2 = composite.newHubPort().build();
    HubPort hubPort3 = composite.newHubPort().build();
    HubPort hubPort4 = composite.newHubPort().build();
    HubPort hubPort5 = composite.newHubPort().build();

    HttpGetEndpoint httpEP = mp.newHttpGetEndpoint().terminateOnEOS().build();
    playerRed.connect(hubPort1);
    playerGreen.connect(hubPort2);
    playerBlue.connect(hubPort3);
    playerWhite.connect(hubPort4);

    hubPort5.connect(httpEP);

    // Test execution
    try (BrowserClient browser =
        new BrowserClient.Builder().browser(browserType).client(Client.PLAYER).build()) {
      browser.setURL(httpEP.getUrl());
      browser.subscribeEvents("playing");
      playerRed.play();
      playerGreen.play();
      playerBlue.play();
      playerWhite.play();
      browser.start();

      // Assertions
      Assert.assertTrue("Timeout waiting playing event", browser.waitForEvent("playing"));
      Assert.assertTrue(
          "Upper left part of the video must be red", browser.color(Color.RED, 10, 0, 0));
      Assert.assertTrue(
          "Upper right part of the video must be green", browser.color(Color.GREEN, 11, 450, 0));
      Assert.assertTrue(
          "Lower left part of the video must be blue", browser.color(Color.BLUE, 12, 0, 450));
      Assert.assertTrue(
          "Lower right part of the video must be white", browser.color(Color.WHITE, 13, 450, 450));
    }
  }
  public void doTest(Browser browserType) throws Exception {
    // Media Pipeline #1
    MediaPipeline mp = pipelineFactory.create();
    PlayerEndpoint playerEP =
        mp.newPlayerEndpoint("http://files.kurento.org/video/10sec/green.webm").build();
    HttpGetEndpoint httpEP = mp.newHttpGetEndpoint().terminateOnEOS().build();
    RecorderEndpoint recorderEP =
        mp.newRecorderEndpoint(FILE_SCHEMA + getDefaultFileForRecording()).build();
    playerEP.connect(httpEP);
    playerEP.connect(recorderEP);

    // Test execution #1. Play the video while it is recorded
    launchBrowser(browserType, httpEP, playerEP, recorderEP);

    // Media Pipeline #2
    PlayerEndpoint playerEP2 =
        mp.newPlayerEndpoint(FILE_SCHEMA + getDefaultFileForRecording()).build();
    HttpGetEndpoint httpEP2 = mp.newHttpGetEndpoint().terminateOnEOS().build();
    playerEP2.connect(httpEP2);

    // Test execution #2. Play the recorded video
    launchBrowser(browserType, httpEP2, playerEP2, null);
  }