### Question:
JdbcContentPersistenceService implements ContentPersistenceService { @Override public int countRecords(String sysContentType) { return rowCount(getTableName(sysContentType)); }  @PostConstruct void init(); @Override Map<String, Object> get(String id, String sysContentType); @Override @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) void store(String id, String sysContentType, Map<String, Object> content); @Override @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) void delete(String id, String sysContentType); List<String> getAllTableNames(); @Override ListRequest listRequestInit(String sysContentType); @Override ListRequest listRequestNext(ListRequest previous); DataSource getDataSource(); @Override int countRecords(String sysContentType); int rowCount(String tableName);  }### Answer:
@Test public void countRecords() { JdbcContentPersistenceService tested = getTested(); String CT = "count_test_type"; Assert.assertEquals(0, tested.countRecords(CT)); tested.ensureTableExists(tested.getTableName(CT)); Assert.assertEquals(0, tested.countRecords(CT)); Map<String, Object> content = new HashMap<>(); tested.store("1", CT, content); Assert.assertEquals(1, tested.countRecords(CT)); tested.store("2", CT, content); tested.store("3", CT, content); tested.store("asdas", CT, content); Assert.assertEquals(4, tested.countRecords(CT)); clearDatabase(); }