### Question:
JpaAuthorityRepository implements AuthorityRepository { @Override public int getCountAll() { Query query = manager.createNamedQuery(JpaAuthority.COUNT_ALL); Number countResult = (Number) query.getSingleResult(); return countResult.intValue(); }  @Override Authority getByAuthority(String authorityName); @Override List<Authority> getAll(); @Override List<Authority> getLimitedList(int offset, int limit); @Override List<Authority> getAllDefault(); @Override int getCountAll(); @Override Class<? extends Authority> getType(); @Override Authority get(String id); @Override Authority save(Authority item); @Override void delete(Authority item);  }### Answer:
@Test public void countAll() { int numberOfAuthorities = repository.getCountAll(); assertTrue("Found at least 1 Authority", numberOfAuthorities > 0); }