### Question:
TableMeta { public Map<String, ColumnMeta> getPrimaryKeyMap() { Map<String, ColumnMeta> pk = new HashMap<String, ColumnMeta>(); for (Entry<String, IndexMeta> entry : allIndexes.entrySet()) { IndexMeta index = entry.getValue(); if (index.getIndextype().value() == IndexType.PRIMARY.value()) { for (ColumnMeta col : index.getValues()) { pk.put(col.getColumnName(), col); } } } if (pk.size() < 1) { throw new NotSupportYetException(String.format("%s needs to contain the primary key.", tableName)); } return pk; }  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 testGetPrimaryKeyMap() { TableMeta tableMeta = new TableMeta(); IndexMeta primary = new IndexMeta(); primary.setIndextype(IndexType.PRIMARY); primary.setValues(Lists.newArrayList(new ColumnMeta())); tableMeta.getAllIndexes().put("id", primary); Assertions.assertNotNull(tableMeta.getPrimaryKeyMap()); }