### Question:
JpaRegionWidgetRepository implements RegionWidgetRepository { @Override public int getCountAll() { Query query = manager.createNamedQuery(JpaRegionWidget.REGION_WIDGET_COUNT_ALL); Number countResult = (Number) query.getSingleResult(); return countResult.intValue(); }  @Override Class<? extends RegionWidget> getType(); @Override RegionWidget get(String id); @Override RegionWidget save(RegionWidget item); @Override void delete(RegionWidget item); @Override List<RegionWidget> getAll(); @Override List<RegionWidget> getLimitedList(int offset, int pageSize); @Override int getCountAll();  }### Answer:
@Test public void getCount(){ int count = repository.getCountAll(); assertThat(count, is(notNullValue())); assertThat(count, is(equalTo(51))); }