@Test public void equalsTest() throws ComponentLookupException { Assert.assertTrue(this.mocker.getComponentUnderTest().equals(this.mocker.getComponentUnderTest())); Assert.assertFalse(this.mocker.getComponentUnderTest().equals(null)); AccessLevel other = mock(AccessLevel.class); when(other.getName()).thenReturn("owner", "view"); Assert.assertTrue(this.mocker.getComponentUnderTest().equals(other)); Assert.assertFalse(this.mocker.getComponentUnderTest().equals(other)); Assert.assertFalse(this.mocker.getComponentUnderTest().equals("owner")); }
@Override public String getName() { return "owner"; }
OwnerAccessLevel extends AbstractAccessLevel { @Override public String getName() { return "owner"; } }
OwnerAccessLevel extends AbstractAccessLevel { @Override public String getName() { return "owner"; } OwnerAccessLevel(); }
OwnerAccessLevel extends AbstractAccessLevel { @Override public String getName() { return "owner"; } OwnerAccessLevel(); @Override String getName(); @Override Right getGrantedRight(); }
OwnerAccessLevel extends AbstractAccessLevel { @Override public String getName() { return "owner"; } OwnerAccessLevel(); @Override String getName(); @Override Right getGrantedRight();  }