* @param expectedObject the expected format reference as an object
* @param actual the actual format reference
*/
protected void checkSame(Object expectedObject,
FormatReference actual) {
FormatReference expected = (FormatReference)expectedObject;
if (expected == null) {
assertNull("actual should be null", actual);
} else {
assertNotNull("actual should not be null",
actual);
assertEquals("stems not as",
expected.getStem(),
actual.getStem());
if (expected.getIndex() == null) {
assertNull("actual instance should be null",
actual.getIndex());
} else {
assertNotNull("actual instance should not be null",
actual.getIndex());
assertTrue("indices don't match (expected: " +
toString(expected.getIndex().getIndicies()) +
") (actual: " +
toString(actual.getIndex().getIndicies()) + ")",
Arrays.equals(expected.getIndex().getIndicies(),
actual.getIndex().getIndicies()));
}
}
}