@Test
public void newSelectDeviceActionDeviceHasValidityReason() {

  // Arrange
  Device device = new VirtualDevice.Builder()
    .setName("Pixel 3 API 29")
    .setValidityReason("Missing system image")
    .setKey(new Key("Pixel_3_API_29/snap_2019-09-27_15-48-09"))
    .setAndroidDevice(Mockito.mock(AndroidDevice.class))
    .build();
  // Act
  AnAction action = SelectDeviceAction.newSelectDeviceAction(myComboBoxAction, myProject, device);
  // Assert
  assertEquals("Pixel 3 API 29 (Missing system image)", action.getTemplatePresentation().getText());
}