Record implements Iterable<Comparable<?>>, Serializable { public boolean isNumeric(int index) { return values[index] instanceof Number; } Record(List<? extends Comparable<?>> values);  Record(Comparable<?>... values); T get(int index); int size(); @Override Iterator<Comparable<?>> iterator(); boolean isNumeric(int index); @Override boolean equals(Object obj); @Override String toString(); Record insert(Comparable<?> value, int position);  }
@Test public void testIsNumericReturnsTrueIfValueIsNumber() { Record record = new Record(-3.0, 1, "SomeString", null); boolean numeric = record.isNumeric(1); assertThat(numeric, is(true)); }
@Test public void testIsNumericReturnsFalseIfValueIsNoNumber() { Record record = new Record(-3.0, 1, "SomeString", null); boolean numeric = record.isNumeric(2); assertThat(numeric, is(false)); }
@Test public void testIsNumericReturnsFalseIfValueIsNull() { Record record = new Record(-3.0, 1, "SomeString", null); boolean numeric = record.isNumeric(3); assertThat(numeric, is(false)); }