### Question:
TableMeta { @SuppressWarnings("serial") public List<String> getPrimaryKeyOnlyName() { List<String> list = new ArrayList<>(); for (Entry<String, ColumnMeta> entry : getPrimaryKeyMap().entrySet()) { list.add(entry.getKey()); } return list; }  String getTableName(); void setTableName(String tableName); ColumnMeta getColumnMeta(String colName); Map<String, ColumnMeta> getAllColumns(); Map<String, IndexMeta> getAllIndexes(); ColumnMeta getAutoIncreaseColumn(); Map<String, ColumnMeta> getPrimaryKeyMap(); @SuppressWarnings("serial") List<String> getPrimaryKeyOnlyName(); List<String> getEscapePkNameList(String dbType); boolean containsPK(List<String> cols); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void testGetPrimaryKeyOnlyName() { TableMeta tableMeta = new TableMeta(); ColumnMeta columnIdMeta=new ColumnMeta(); columnIdMeta.setColumnName(COLUMN_ID); IndexMeta primary = new IndexMeta(); primary.setIndextype(IndexType.PRIMARY); primary.setValues(Lists.newArrayList(columnIdMeta)); ColumnMeta columnUserCodeMeta=new ColumnMeta(); columnUserCodeMeta.setColumnName(COLUMN_USERCODE); IndexMeta primary2 = new IndexMeta(); primary2.setIndextype(IndexType.PRIMARY); primary2.setValues(Lists.newArrayList(columnUserCodeMeta)); tableMeta.getAllIndexes().put(COLUMN_ID, primary); tableMeta.getAllIndexes().put(COLUMN_USERCODE, primary2); List<String> pkColumnName=tableMeta.getPrimaryKeyOnlyName(); Assertions.assertEquals("id",pkColumnName.get(0)); Assertions.assertEquals("userCode",pkColumnName.get(1)); }