@Test
public void getEmulatorScreenRecorderOptions() {

  Path path = Jimfs.newFileSystem().getPath("sdcard", "1.mp4");
  String expectedPath = path.toString();
  assert expectedPath.equals("sdcard" + File.separator + "1.mp4");
  ScreenRecorderOptions options = new ScreenRecorderOptions.Builder()
    .setBitRate(6)
    .setSize(600, 400)
    .build();
  assertEquals("--size 600x400 --bit-rate 6000000 " + expectedPath,
               ScreenRecorderAction.getEmulatorScreenRecorderOptions(path, options));
  options = new ScreenRecorderOptions.Builder()
    .setTimeLimit(100, TimeUnit.SECONDS)
    .build();
  assertEquals("--time-limit 100 " + expectedPath, ScreenRecorderAction.getEmulatorScreenRecorderOptions(path, options));
  options = new ScreenRecorderOptions.Builder()
    .setTimeLimit(4, TimeUnit.MINUTES)
    .build();
  assertEquals("--time-limit 180 " + expectedPath, ScreenRecorderAction.getEmulatorScreenRecorderOptions(path, options));
}