public void test_equalsLjava_lang_Object(){
  try {
    DateFormat format=DateFormat.getInstance();
    DateFormat clone=(DateFormat)format.clone();
    assertTrue("Clone and parent are not equaled",format.equals(clone));
    assertTrue("Clone is equal to other object",!clone.equals(DateFormat.getTimeInstance()));
    format.setCalendar(Calendar.getInstance());
    assertTrue("Clone and parent are not equaled",format.equals(clone));
  }
 catch (  Exception e) {
    fail("Unexpected exception " + e.toString());
  }
}

public void test_equalsLjava_lang_Object ( ) { try { DateFormat format = DateFormat . getInstance ( ) ; DateFormat clone = ( DateFormat ) format . clone ( ) ; assertTrue ( "Clone and parent are not equaled" , format . equals ( clone ) ) ; assertTrue ( "Clone is equal to other object" , ! clone . equals ( DateFormat . getTimeInstance ( ) ) ) ; format . setCalendar ( Calendar . getInstance ( ) ) ; assertTrue ( "Clone and parent are not equaled" , format . equals ( clone ) ) ; } catch ( Exception e ) { fail ( "Unexpected exception " + e . toString ( ) ) ; } }
java . text . dateformat # equals ( java . lang . object obj ) test of java . text . dateformat # equals ( java . lang . object obj ) .
