Access { public Access setGranted(boolean granted) { this.granted = granted; return this; }  Access setGranted(boolean granted); boolean getGranted(); @Override boolean equals(Object another); public boolean granted; }
@Test public void testSetGranted() { Access a = new Access(); assertTrue(a.setGranted(true).granted); }
@Test public void testEqualsSameObj() { Access a = new Access().setGranted(true); Access b = new Access().setGranted(false); assertEquals(a, a); assertNotEquals(a, b); b.setGranted(true); assertEquals(a, b); }