### Question:
IndexedParameterSpace implements IndexedCollection<ParamSet> { @Override public boolean equals(final Object o) { if(this == o) { return true; } if(o == null || getClass() != o.getClass()) { return false; } final IndexedParameterSpace space = (IndexedParameterSpace) o; return getParamSpace().equals(space.getParamSpace()); } IndexedParameterSpace(
        final ParamSpace paramSpace); ParamSpace getParamSpace(); IndexedParameterSpace setParamSpace(
        final ParamSpace paramSpace); @Override boolean equals(final Object o); @Override int hashCode(); @Override ParamSet get(final int index); @Override int size(); static Object get(ParameterDimension<?> dimension, int index); static ParamSet get(final List<ParamSpace> spaces, final List<Integer> indices); static ParamSet get(ParamSpace space, int index); static Object get(List<ParameterDimension<?>> dimensions, int index); static int size(ParamSpace space); static int size(ParameterDimension<?> dimension); static List<Integer> sizesParameterSpace(List<ParamSpace> spaces); static int size(List<ParameterDimension<?>> dimensions); static List<Integer> sizesParameterDimension(List<ParameterDimension<?>> dimensions); static List<Integer> sizes(ParamSpace space); static List<Integer> sizes(ParameterDimension<?> dimension);  }### Answer:
@Test public void testEquals() { ParamSpace wParams = new ParamSpaceTest().buildWParams(); IndexedParameterSpace a = new IndexedParameterSpace(wParams); IndexedParameterSpace b = new IndexedParameterSpace(wParams); ParamSpace alt = new ParamSpace(); alt.add("letters", new DiscreteParameterDimension<>(Arrays.asList("a", "b", "c"))); IndexedParameterSpace c = new IndexedParameterSpace(alt); IndexedParameterSpace d = new IndexedParameterSpace(alt); Assert.assertEquals(a, b); Assert.assertEquals(a.hashCode(), b.hashCode()); Assert.assertEquals(c, d); Assert.assertEquals(c.hashCode(), c.hashCode()); Assert.assertNotEquals(a, c); Assert.assertNotEquals(a.hashCode(), c.hashCode()); Assert.assertNotEquals(b, c); Assert.assertNotEquals(b.hashCode(), c.hashCode()); Assert.assertNotEquals(a, d); Assert.assertNotEquals(a.hashCode(), d.hashCode()); Assert.assertNotEquals(b, d); Assert.assertNotEquals(b.hashCode(), d.hashCode()); }