public static void assertEqualsNaN(String message,double expected,double actual){
  if (Double.isNaN(expected)) {
    if (!Double.isNaN(actual)) {
      throw new AssertionFailedError(message + " expected: <" + expected+ "> but was: <"+ actual+ ">");
    }
  }
 else {
    assertEquals(message,expected,actual,DELTA);
  }
}

public static void assertEqualsNaN ( String message , double expected , double actual ) { if ( Double . isNaN ( expected ) ) { if ( ! Double . isNaN ( actual ) ) { throw new AssertionFailedError ( message + " expected: <" + expected + "> but was: <" + actual + ">" ) ; } } else { assertEquals ( message , expected , actual , DELTA ) ; } }
extends the junit assertequals method by additionally checking the doubles for nan .
