@Test
public void compareValid() {

  Device device1 = new VirtualDevice.Builder()
    .setName("Pixel 3 API 28")
    .setKey(new Key("Pixel_3_API_28"))
    .setAndroidDevice(Mockito.mock(AndroidDevice.class))
    .build();
  Device device2 = new VirtualDevice.Builder()
    .setName("Pixel 2 XL API 28")
    .setValid(false)
    .setKey(new Key("Pixel_2_XL_API_28"))
    .setAndroidDevice(Mockito.mock(AndroidDevice.class))
    .build();
  assertTrue(new DeviceComparator().compare(device1, device2) < 0);
}