Assert { public static void notEquals(final Object obj1, final Object obj2, final int errorCode, final Object... params) { if ((obj1 != null && obj1.equals(obj2)) || (obj2 != null && obj2.equals(obj1))) { throw new AssertException(errorCode, params); } }  static void notNull(final Object obj, final int errorCode, final Object... params); static void isNull(final Object obj, final int errorCode, final Object... params); static void notEmpty(final String str, final int errorCode, final Object... params); static void isEmpty(final String str, final int errorCode, final Object... params); static void notEmpty(final T[] str, final int errorCode, final Object... params); static void isEmpty(final T[] str, final int errorCode, final Object... params); static void notEmpty(final Collection<?> str, final int errorCode, final Object... params); static void isEmpty(final Collection<?> str, final int errorCode, final Object... params); static void notEmpty(final Map<?, ?> str, final int errorCode, final Object... params); static void isEmpty(final Map<?, ?> str, final int errorCode, final Object... params); static void equals(final Object obj1, final Object obj2, final int errorCode, final Object... params); static void notEquals(final Object obj1, final Object obj2, final int errorCode, final Object... params); static void isTrue(final boolean result, final int errorCode, final Object... params); static void isFalse(final boolean result, final int errorCode, final Object... params);  }
@Test public void notEquals() { String a = "abc"; String b = "abd"; Assert.notEquals(a, b, ErrorCodeDef.SYSTEM_ERROR_10001); System.out.println("字符串a not equals 字符串b"); Object c = new Object(); Object d = new Object(); Assert.notEquals(c, d, ErrorCodeDef.SYSTEM_ERROR_10001); System.out.println("对象c not equals 对象d"); }