@Test
public void resourceAdapter_hashCodeAndEquals() {
initContext("beans.xml");
ResourceAdapter r1 = (ResourceAdapter) context.getResource("/webroot/beans.xml");
ResourceAdapter r2 = (ResourceAdapter) context.getResource("/webroot/beans.xml");
assertHashCodeAndEquals(r1, r2);
r2 = (ResourceAdapter) context.getResource("/basedir/beans.xml"); // ����ͬһ����
assertNotSame(r1, r2);
assertNotSame(r1.getResource(), r2.getResource());
assertThat(r1.hashCode(), not(equalTo(r2.hashCode())));
assertThat(r1.getResource().hashCode(), not(equalTo(r2.getResource().hashCode())));
assertThat(r1, not(equalTo(r2)));
assertThat(r1.getResource(), not(equalTo(r2.getResource())));
}