class MongoDbAuthorityRepository implements AuthorityRepository {

    @Override
    public Authority getByAuthority(String authorityName) {
        return template.findOne(query(where("authority").is(authorityName)), CLASS, AUTHORITY_COLLECTION);
    }

}