@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("edit", "view"); Assert.assertTrue(this.mocker.getComponentUnderTest().equals(other)); Assert.assertFalse(this.mocker.getComponentUnderTest().equals(other)); Assert.assertFalse(this.mocker.getComponentUnderTest().equals("edit")); }
@Override public String getName() { return "edit"; }
EditAccessLevel extends AbstractAccessLevel { @Override public String getName() { return "edit"; } }
EditAccessLevel extends AbstractAccessLevel { @Override public String getName() { return "edit"; } EditAccessLevel(); }
EditAccessLevel extends AbstractAccessLevel { @Override public String getName() { return "edit"; } EditAccessLevel(); @Override String getName(); @Override Right getGrantedRight(); }
EditAccessLevel extends AbstractAccessLevel { @Override public String getName() { return "edit"; } EditAccessLevel(); @Override String getName(); @Override Right getGrantedRight();  }