@Test
public void getTextDeviceHasValidityReason() {

  // Arrange
  Device device = new VirtualDevice.Builder()
    .setName("Pixel 3 API 29")
    .setValidityReason("Missing system image")
    .setKey(new Key("Pixel_3_API_29"))
    .setAndroidDevice(Mockito.mock(AndroidDevice.class))
    .build();
  // Act
  Object text = DeviceAndSnapshotComboBoxAction.getText(device, Collections.singletonList(device), true);
  // Assert
  assertEquals("Pixel 3 API 29 (Missing system image)", text);
}