### Question:
Size implements Function<A, Integer> { private Integer evaluateArray(Object array) { return Integer.valueOf(Array.getLength(array)); } Size(); Integer evaluate(Object obj); @Override boolean equals(Object that); @Override int hashCode(); @Override String toString(); static Size<Object> instance();  }### Answer:
@Test public void testEvaluateArray() throws Exception { assertEquals(Integer.valueOf(10), Size.instance().evaluate(new int[10])); assertEquals(Integer.valueOf(7), Size.instance().evaluate(new String[7])); }