protected void assertEquals(double expected,double actual){
  if (expected != actual) {
    if (Double.isNaN(expected) && Double.isNaN(actual)) {
    }
 else {
      fail("Expected: " + expected + " actual: "+ actual);
    }
  }
}

protected void assertEquals ( double expected , double actual ) { if ( expected != actual ) { if ( Double . isNaN ( expected ) && Double . isNaN ( actual ) ) { } else { fail ( "Expected: " + expected + " actual: " + actual ) ; } } }
check if two values are equal , and if not throw an exception .
