### Question:
ListComboBoxModel extends AbstractListModel<E> implements MutableComboBoxModel<E> { public int getIndexOf(Object anObject) { return myObjects.indexOf(anObject); } ListComboBoxModel(); @SafeVarargs @SuppressWarnings({ "varargs", "PMD.ConstructorCallsOverridableMethod" })  ListComboBoxModel(E... items); @SuppressWarnings("PMD.ConstructorCallsOverridableMethod")  ListComboBoxModel(Collection<? extends E> items); private  ListComboBoxModel(List<E> items); @SuppressWarnings("unchecked") @Override @Deprecated void setSelectedItem(Object anObject); void setSelectedElement(E anObject); @Override E getSelectedItem(); @Override int getSize(); @Override E getElementAt(int index); int getIndexOf(Object anObject); @Override void addElement(E anObject); @Override void insertElementAt(E anObject, int index); @Override void removeElementAt(int index); @Override void removeElement(Object anObject); void removeAllElements();  }### Answer:
@Test public void testGetIndexOf() { List<Integer> list = Arrays.asList(Integer.valueOf(0), Integer.valueOf(1), Integer.valueOf(2)); ListComboBoxModel<Integer> model = new ListComboBoxModel<>(list); Assert.assertEquals(0, model.getIndexOf(Integer.valueOf(0))); Assert.assertEquals(1, model.getIndexOf(Integer.valueOf(1))); Assert.assertEquals(2, model.getIndexOf(Integer.valueOf(2))); Assert.assertEquals(-1, model.getIndexOf(Integer.valueOf(4))); Assert.assertEquals(-1, model.getIndexOf(null)); }