OpenType[] itemTypes = new OpenType[] { SimpleType.STRING, SimpleType.INTEGER };
CompositeType rowType = new CompositeType("rowTypeName", "rowDescription",
itemNames, itemDescriptions, itemTypes);
String[] indexNames = new String[] { "name1", "name2" };
TabularType tabularType = new TabularType("typeName", "description", rowType, indexNames);
TabularDataSupport data = new TabularDataSupport(tabularType);
assertTrue("Null should not be equal", data.equals(null) == false);
assertTrue("Only TabularData should be equal", data.equals(new Object()) == false);
assertTrue("An instance should equal itself", data.equals(data));
TabularDataSupport data2 = new TabularDataSupport(tabularType);
assertTrue("Two different instances with the same tabular type are equal", data.equals(data2));
assertTrue("Two different instances with the same tabular type are equal", data2.equals(data));
TabularType tabularType2 = new TabularType("typeName2", "description", rowType, indexNames);
data2 = new TabularDataSupport(tabularType2);
assertTrue("Instances with different tabular type are not equal", data.equals(data2) == false);
assertTrue("Instances with different tabular type are not equal", data2.equals(data) == false);