    @Test
    public void testHashCode() {

        Authority userAuthority = new Authority("user");
        Authority adminAuthority = new Authority("admin");

        assertThat(userAuthority.hashCode(), not(equalTo(adminAuthority.hashCode())));
        assertThat(userAuthority.hashCode(), equalTo(new Authority("user").hashCode()));
    }