PermissionsManager { public List<AbstractPermissionsDomain> getDomains() { return new ArrayList<>(domains); } @Inject  PermissionsManager(
      EventService eventService, Set<PermissionsDao<? extends AbstractPermissions>> daos); void storePermission(Permissions permissions); AbstractPermissions get(String userId, String domainId, String instanceId); @SuppressWarnings("unchecked") Page<AbstractPermissions> getByInstance(
      String domainId, String instanceId, int maxItems, long skipCount); void remove(String userId, String domainId, String instanceId); boolean exists(String userId, String domainId, String instanceId, String action); void checkActionsSupporting(String domainId, List<String> actions); List<AbstractPermissionsDomain> getDomains(); AbstractPermissionsDomain<? extends AbstractPermissions> getDomain(String domain);  }
@Test public void shouldBeAbleToDomains() throws Exception { final List<AbstractPermissionsDomain> domains = permissionsManager.getDomains(); assertEquals(domains.size(), 1); assertTrue(domains.contains(new TestDomain())); }