@Test public void removePermission() { Collection<BPermission> auxP = new HashSet<>(); auxP.add(sampleP); cleanEntity0(); ReflectionTestUtils.setField(entity0, "permissions", auxP); Collection<?> permissions = (HashSet<?>) ReflectionTestUtils.getField(entity0, "permissions"); assertTrue(permissions != null && permissions.contains(sampleP)); entity0.removePermission(sampleP); permissions = (HashSet<?>) ReflectionTestUtils.getField(entity0, "permissions"); assertTrue(permissions != null && !permissions.contains(sampleP)); }
public void removePermission(final BPermission... p) { if (permissions != null) { for (BPermission iP : p) { permissions.remove(iP); } } }
BRole extends GmsEntity { public void removePermission(final BPermission... p) { if (permissions != null) { for (BPermission iP : p) { permissions.remove(iP); } } } }
BRole extends GmsEntity { public void removePermission(final BPermission... p) { if (permissions != null) { for (BPermission iP : p) { permissions.remove(iP); } } }  }
BRole extends GmsEntity { public void removePermission(final BPermission... p) { if (permissions != null) { for (BPermission iP : p) { permissions.remove(iP); } } }  void addPermission(final BPermission... p); void removePermission(final BPermission... p); void removeAllPermissions(); }
BRole extends GmsEntity { public void removePermission(final BPermission... p) { if (permissions != null) { for (BPermission iP : p) { permissions.remove(iP); } } }  void addPermission(final BPermission... p); void removePermission(final BPermission... p); void removeAllPermissions();  }