Package { @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final Package other = (Package) obj; if (!name.equals(other.name)) { return false; } return true; } private  Package();  Package(@Nonnull final String packageName); @Override boolean equals(final Object obj); @Nonnull String getName(); @Override int hashCode(); boolean isUndefined(); @Override String toString(); static final Package UNDEFINED; static final Package JAVA_LANG; }
@Test public void equals_null() { final Package a = new Package("test.pkg"); assertFalse(a.equals(null)); }
@Test public void equals_otherClass() { final Package a = new Package("test.pkg"); assertFalse(a.equals("")); }