### Question:
Field extends Element<F> implements FormElement { public static <T> MultiSelectionField<T> ofMultiSelectionType(List<T> items, List<Integer> selection) { return new MultiSelectionField<>(new SimpleListProperty<>(FXCollections.observableArrayList(items)), selection); } protected  Field(); static PasswordField ofPasswordType(String defaultValue); static PasswordField ofPasswordType(StringProperty binding); static StringField ofStringType(String defaultValue); static StringField ofStringType(StringProperty binding); static DoubleField ofDoubleType(double defaultValue); static DoubleField ofDoubleType(DoubleProperty binding); static IntegerField ofIntegerType(int defaultValue); static IntegerField ofIntegerType(IntegerProperty binding); static BooleanField ofBooleanType(boolean defaultValue); static BooleanField ofBooleanType(BooleanProperty binding); static MultiSelectionField<T> ofMultiSelectionType(List<T> items, List<Integer> selection); static MultiSelectionField<T> ofMultiSelectionType(List<T> items); static MultiSelectionField<T> ofMultiSelectionType(ListProperty<T> itemsBinding, ListProperty<T> selectionBinding); static SingleSelectionField<T> ofSingleSelectionType(List<T> items, int selection); static SingleSelectionField<T> ofSingleSelectionType(List<T> items); static SingleSelectionField<T> ofSingleSelectionType(ListProperty<T> itemsBinding, ObjectProperty<T> selectionBinding); static DateField ofDate(LocalDate defaultValue); static DateField ofDate(ObjectProperty<LocalDate> binding); F required(boolean newValue); F required(String errorMessage); F editable(boolean newValue); F label(String newValue); F labelDescription(Node newValue); F labelDescription(String newValue); F valueDescription(Node newValue); F valueDescription(String newValue); F tooltip(String newValue); F placeholder(String newValue); F render(SimpleControl<F> newValue); abstract void setBindingMode(BindingMode newValue); void translate(TranslationService newValue); String getPlaceholder(); StringProperty placeholderProperty(); String getLabel(); StringProperty labelProperty(); String getTooltip(); StringProperty tooltipProperty(); boolean isValid(); BooleanProperty validProperty(); boolean hasChanged(); BooleanProperty changedProperty(); boolean isRequired(); BooleanProperty requiredProperty(); boolean isEditable(); BooleanProperty editableProperty(); boolean isI18N(); SimpleControl<F> getRenderer(); List<String> getErrorMessages(); ListProperty<String> errorMessagesProperty(); Field addEventHandler(EventType<FieldEvent> eventType, EventHandler<? super FieldEvent> eventHandler); Field removeEventHandler(EventType<FieldEvent> eventType, EventHandler<? super FieldEvent> eventHandler); Node getLabelDescription(); Node getValueDescription();  }### Answer:
@Test public void multiSelectionTest() { MultiSelectionField<String> s = Field.ofMultiSelectionType(Arrays.asList("Test", "Test 1", "Test 2"), Arrays.asList(0, 3)); Assert.assertEquals(1, s.getSelection().size()); s.select(2); Assert.assertEquals(2, s.getSelection().size()); s.select(4); Assert.assertEquals(2, s.getSelection().size()); s.deselect(1); Assert.assertEquals(2, s.getSelection().size()); s.deselect(0); Assert.assertEquals(1, s.getSelection().size()); }