### Question:
DatastoreSynonymCatalog extends AbstractReferenceData implements SynonymCatalog { @Override public Collection<Synonym> getSynonyms() { final Datastore datastore = getDatastore(); try (DatastoreConnection datastoreConnection = datastore.openConnection()) { final DataContext dataContext = datastoreConnection.getDataContext(); final SchemaNavigator schemaNavigator = datastoreConnection.getSchemaNavigator(); final Column masterTermColumn = schemaNavigator.convertToColumn(_masterTermColumnPath); final Column[] columns = schemaNavigator.convertToColumns(_synonymColumnPaths); final Table table = masterTermColumn.getTable(); final Query query = dataContext.query().from(table.getName()).select(masterTermColumn).select(columns) .toQuery(); final DataSet results = dataContext.executeQuery(query); final List<Synonym> synonyms = new ArrayList<Synonym>(); while (results.next()) { final Row row = results.getRow(); synonyms.add(new SimpleSynonym(getMasterTerm(row, masterTermColumn), getSynonyms(row, table.getColumns()))); } return synonyms; } } DatastoreSynonymCatalog(String name, String datastoreName, String masterTermColumnPath,
            String[] synonymColumnPaths); @Initialize void init(); @Close void close(); String getDatastoreName(); String getMasterTermColumnPath(); String[] getSynonymColumnPaths(); @Override Collection<Synonym> getSynonyms(); @Override String getMasterTerm(String term);  }### Answer:
@Test public void shouldReturnAllSynonyms() { Collection<Synonym> synonyms = _dataStoreBasedSynonymCatalog.getSynonyms(); org.junit.Assert.assertEquals(3, synonyms.size()); }