DeviceAndSnapshotComboBoxAction extends ComboBoxAction { @Nullable final Device getSelectedDevice(@NotNull Project project) { return getSelectedDevice(project, getDevices(project)); } @SuppressWarnings("unused") private  DeviceAndSnapshotComboBoxAction(); @VisibleForTesting  DeviceAndSnapshotComboBoxAction(@NotNull Supplier<Boolean> selectDeviceSnapshotComboBoxSnapshotsEnabled,
                                         @NotNull Function<Project, AsyncDevicesGetter> devicesGetterGetter,
                                         @NotNull Function<Project, PropertiesComponent> getProperties,
                                         @NotNull Clock clock); @NotNull @Override final JComponent createCustomComponent(@NotNull Presentation presentation, @NotNull String place); @Override final void update(@NotNull AnActionEvent event); static final com.intellij.openapi.util.Key<Boolean> DEPLOYS_TO_LOCAL_DEVICE; }
@Test public void getSelectedDeviceDevicesIsEmpty() { DeviceAndSnapshotComboBoxAction action = new DeviceAndSnapshotComboBoxAction( () -> true, project -> myDevicesGetter, project -> null, myClock); assertNull(action.getSelectedDevice(myProject)); }