### Question:
DefaultKeyedValues2D implements KeyedValues2D, PublicCloneable,
        Cloneable, Serializable { public void removeRow(int rowIndex) { this.rowKeys.remove(rowIndex); this.rows.remove(rowIndex); } DefaultKeyedValues2D();  DefaultKeyedValues2D(boolean sortRowKeys); @Override int getRowCount(); @Override int getColumnCount(); @Override Number getValue(int row, int column); @Override Comparable getRowKey(int row); @Override int getRowIndex(Comparable key); @Override List<Comparable> getRowKeys(); @Override Comparable getColumnKey(int column); @Override int getColumnIndex(Comparable key); @Override List<Comparable> getColumnKeys(); @Override Number getValue(Comparable rowKey, Comparable columnKey); void addValue(Number value, Comparable rowKey,
                         Comparable columnKey); void setValue(Number value, Comparable rowKey,
                         Comparable columnKey); void removeValue(Comparable rowKey, Comparable columnKey); void removeRow(int rowIndex); void removeRow(Comparable rowKey); void removeColumn(int columnIndex); void removeColumn(Comparable columnKey); void clear(); @Override boolean equals(Object o); @Override int hashCode(); @Override Object clone();  }### Answer:
@Test public void testRemoveRow() { DefaultKeyedValues2D d = new DefaultKeyedValues2D(); try { d.removeRow(0); fail("IndexOutOfBoundsException should have been thrown on querying emty dataset"); } catch (IndexOutOfBoundsException e) { assertEquals("Index: 0, Size: 0", e.getMessage()); } }