MBeanServerPermissionTest.java 文件源码

java
阅读 18 收藏 0 点赞 0 评论 0

项目:freeVM 作者:
/**
 * Test for the method hashCode()
 * 
 * @see javax.management.MBeanServerPermission#hashCode()
 */
public final void testHashCode() {
    MBeanServerPermission p1 = new MBeanServerPermission(
        "createMBeanServer");
    MBeanServerPermission p2 = new MBeanServerPermission(
        "createMBeanServer");

    assertEquals("The hashCode() method must return the same integer "
        + "when it is invoked on the same object more than once!", p1
        .hashCode(), p1.hashCode());
    assertEquals("If two objects are equal according to the equals(Object)"
        + " method, then hashCode method on each of them must"
        + " produce the same integer. ", p1.hashCode(), p2.hashCode());
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号