Here you can find the source of assertEquals(String expected, String actual)
private static void assertEquals(String expected, String actual)
//package com.java2s; //License from project: Open Source License public class Main { private static void assertEquals(String expected, String actual) { if (expected == null && actual != null || expected != null && !expected.equals(actual)) { throw new AssertionError("Expected: " + coalesce(expected) + ", actual: " + coalesce(actual)); }/*from www . j a v a 2s.c o m*/ System.out.println("Passed: " + coalesce(actual)); } private static String coalesce(String s) { return s != null ? "'" + s + "'" : s; } }