### Question:
ConfigurationEntryService extends PersistenceService<ConfigurationEntry, ConfigurationEntryDto, Long> { public ConfigurationEntryQuery createQuery() { return new ConfigurationEntryQueryImpl(createEntityManager(), entryMapper); } ConfigurationEntryService(EntityManagerFactory entityManagerFactory, ConfigurationEntryMapper entryMapper); ConfigurationEntryQuery createQuery();  }### Answer:
@Test void testAdd() { configurationEntryService.add(CONFIGURATION_ENTRY_1); assertEquals(1, configurationEntryService.createQuery() .list() .size()); assertEquals(CONFIGURATION_ENTRY_1.getId(), configurationEntryService.createQuery() .id(CONFIGURATION_ENTRY_1.getId()) .singleResult() .getId()); }
@Test void testAddWithNonEmptyDatabase() { addConfigurationEntries(List.of(CONFIGURATION_ENTRY_1, CONFIGURATION_ENTRY_2)); assertConfigurationEntryExists(CONFIGURATION_ENTRY_1.getId()); assertConfigurationEntryExists(CONFIGURATION_ENTRY_2.getId()); assertEquals(2, configurationEntryService.createQuery() .list() .size()); }
@Test void testQueryByVersion() { addConfigurationEntries(List.of(CONFIGURATION_ENTRY_1, CONFIGURATION_ENTRY_2)); String version = ">3.0.0"; assertEquals(1, configurationEntryService.createQuery() .version(version) .list() .size()); }
@Test void testQueryByProviderNamespace() { addConfigurationEntries(ALL_ENTRIES); ConfigurationEntryQuery allEntries = configurationEntryService.createQuery() .providerNamespace(null, false); assertEquals(3, allEntries.list() .size()); ConfigurationEntryQuery allEntriesNoNamespace = configurationEntryService.createQuery() .providerNamespace(null, true); assertEquals(2, allEntriesNoNamespace.list() .size()); ConfigurationEntryQuery allEntriesNoNamespaceUsingKeyword = configurationEntryService.createQuery() .providerNamespace("default", false); assertEquals(2, allEntriesNoNamespaceUsingKeyword.list() .size()); ConfigurationEntryQuery specificEntryByNamespace = configurationEntryService.createQuery() .providerNamespace("namespace", false); assertEquals(1, specificEntryByNamespace.list() .size()); }