### Question:
DataTagDao extends EntityDbTable<DataTag> { public DbKey newDbKey(DataTag dataTag) { return tagDbKeyFactory.newKey(dataTag.getTag()); } @Inject  DataTagDao(); DbKey newDbKey(DataTag dataTag); void add(TaggedData taggedData); void add(String[] tags, int height); @Override boolean isScanSafe(); void add(TaggedData taggedData, int height); void delete(Map<String, Integer> expiredTags); int getDataTagCount(); DbIterator<DataTag> getAllTags(int from, int to); DbIterator<DataTag> getTagsLike(String prefix, int from, int to); @Override DataTag load(Connection con, ResultSet rs, DbKey dbKey); @Override void save(Connection con, DataTag dataTag); @Override String defaultSort();  }### Answer:
@Test void getDataTagById() { DbKey dbKey = dataTagDao.newDbKey(tagtd.dataTag_1); DataTag result = dataTagDao.get(dbKey); assertNotNull(result); assertEquals(result.getTag(), tagtd.dataTag_1.getTag()); }