@Test
public void getTemporaryVideoPathForVirtualDevice() {

  ScreenRecorderAction action = new ScreenRecorderAction(myRule.getProject(), myContext, myFeatures);
  IDevice device = Mockito.mock(IDevice.class);
  AvdManager manager = Mockito.mock(AvdManager.class);
  AvdInfo virtualDevice = new AvdInfo(
    "Pixel_2_XL_API_28",
    new File("/usr/local/google/home/juancnuno/.android/avd/Pixel_2_XL_API_28.ini"),
    "/usr/local/google/home/juancnuno/.android/avd/Pixel_2_XL_API_28.avd",
    Mockito.mock(ISystemImage.class),
    null);
  Mockito.when(myFeatures.screenRecord(device)).thenReturn(true);
  Mockito.when(manager.getAvd(device.getAvdName(), true)).thenReturn(virtualDevice);
  Object path = action.getTemporaryVideoPathForVirtualDevice(device, manager);
  assertEquals(Paths.get("/usr/local/google/home/juancnuno/.android/avd/Pixel_2_XL_API_28.avd/tmp.webm"), path);
}