@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("none", "view"); Assert.assertTrue(this.mocker.getComponentUnderTest().equals(other)); Assert.assertFalse(this.mocker.getComponentUnderTest().equals(other)); Assert.assertFalse(this.mocker.getComponentUnderTest().equals("none")); }
@Override public String getName() { return "none"; }
NoAccessLevel extends AbstractAccessLevel { @Override public String getName() { return "none"; } }
NoAccessLevel extends AbstractAccessLevel { @Override public String getName() { return "none"; } NoAccessLevel(); }
NoAccessLevel extends AbstractAccessLevel { @Override public String getName() { return "none"; } NoAccessLevel(); @Override String getName(); @Override int compareTo(AccessLevel o); }
NoAccessLevel extends AbstractAccessLevel { @Override public String getName() { return "none"; } NoAccessLevel(); @Override String getName(); @Override int compareTo(AccessLevel o);  }