@Test public void testFindByDomain() throws TechnicalException { Role role = new Role(); role.setName("testName"); role.setReferenceType(ReferenceType.DOMAIN); role.setReferenceId("testDomain"); roleRepository.create(role).blockingGet(); TestObserver<Set<Role>> testObserver = roleRepository.findByDomain("testDomain").test(); testObserver.awaitTerminalEvent(); testObserver.assertComplete(); testObserver.assertNoErrors(); testObserver.assertValue(roles -> roles.size() == 1); }
@Override public Single<Set<Role>> findByDomain(String domain) { return findAll(DOMAIN, domain).collect(HashSet::new, Set::add); }
MongoRoleRepository extends AbstractManagementMongoRepository implements RoleRepository { @Override public Single<Set<Role>> findByDomain(String domain) { return findAll(DOMAIN, domain).collect(HashSet::new, Set::add); } }
MongoRoleRepository extends AbstractManagementMongoRepository implements RoleRepository { @Override public Single<Set<Role>> findByDomain(String domain) { return findAll(DOMAIN, domain).collect(HashSet::new, Set::add); }  }
MongoRoleRepository extends AbstractManagementMongoRepository implements RoleRepository { @Override public Single<Set<Role>> findByDomain(String domain) { return findAll(DOMAIN, domain).collect(HashSet::new, Set::add); }  @PostConstruct void init(); @Override Flowable<Role> findAll(ReferenceType referenceType, String referenceId); @Override Single<Set<Role>> findByDomain(String domain); @Override Single<Set<Role>> findByIdIn(List<String> ids); @Override Maybe<Role> findById(ReferenceType referenceType, String referenceId, String role); @Override Maybe<Role> findById(String role); @Override Single<Role> create(Role item); @Override Single<Role> update(Role item); @Override Completable delete(String id); @Override Maybe<Role> findByNameAndAssignableType(ReferenceType referenceType, String referenceId, String name, ReferenceType assignableType); }
MongoRoleRepository extends AbstractManagementMongoRepository implements RoleRepository { @Override public Single<Set<Role>> findByDomain(String domain) { return findAll(DOMAIN, domain).collect(HashSet::new, Set::add); }  @PostConstruct void init(); @Override Flowable<Role> findAll(ReferenceType referenceType, String referenceId); @Override Single<Set<Role>> findByDomain(String domain); @Override Single<Set<Role>> findByIdIn(List<String> ids); @Override Maybe<Role> findById(ReferenceType referenceType, String referenceId, String role); @Override Maybe<Role> findById(String role); @Override Single<Role> create(Role item); @Override Single<Role> update(Role item); @Override Completable delete(String id); @Override Maybe<Role> findByNameAndAssignableType(ReferenceType referenceType, String referenceId, String name, ReferenceType assignableType); static final String FIELD_SYSTEM; }