@Test
public void selectDeviceActionTwoDevicesHaveSameName() {

  // Arrange
  Device lgeNexus5x1 = new PhysicalDevice.Builder()
    .setName("LGE Nexus 5X")
    .setKey(new Key("00fff9d2279fa601"))
    .setAndroidDevice(Mockito.mock(AndroidDevice.class))
    .build();
  Device lgeNexus5x2 = new PhysicalDevice.Builder()
    .setName("LGE Nexus 5X")
    .setKey(new Key("00fff9d2279fa602"))
    .setAndroidDevice(Mockito.mock(AndroidDevice.class))
    .build();
  Mockito.when(myComboBoxAction.getDevices(myProject)).thenReturn(Arrays.asList(lgeNexus5x1, lgeNexus5x2));
  // Act
  AnAction action = SelectDeviceAction.newSelectDeviceAction(myComboBoxAction, myProject, lgeNexus5x1);
  // Assert
  assertEquals("LGE Nexus 5X [00fff9d2279fa601]", action.getTemplatePresentation().getText());
}