### Question:
MetadataUtils { public static String serializeKeys(Set<String> foreignKeys) { if (null == foreignKeys || foreignKeys.isEmpty()) { return null; } StringBuilder sb = new StringBuilder(); for (String key : foreignKeys) { if (sb.length() > 0) { sb.append(Constants.FOREIGN_KEY_SEPARATOR); } sb.append(key); } return sb.toString(); }  static void populateColumnAndSuperColumnMaps(EntityMetadata m, Map<String, Field> columnNameToFieldMap,
            Map<String, Field> superColumnNameToFieldMap, final KunderaMetadata kunderaMetadata); static Map<String, Field> createColumnsFieldMap(EntityMetadata m, EmbeddableType superColumn); static Map<String, Field> createSuperColumnsFieldMap(final EntityMetadata m,
            final KunderaMetadata kunderaMetadata); static Collection getEmbeddedCollectionInstance(Field embeddedCollectionField); static Object getEmbeddedGenericObjectInstance(Field embeddedCollectionField); static String getEmbeddedCollectionPrefix(String embeddedCollectionName); static String getEmbeddedCollectionPostfix(String embeddedCollectionName); static String serializeKeys(Set<String> foreignKeys); static Set<String> deserializeKeys(String foreignKeys); static void setSchemaAndPersistenceUnit(EntityMetadata m, String schemaStr, Map puProperties); static boolean useSecondryIndex(ClientMetadata clientMetadata); static String getMappedName(EntityMetadata parentMetadata, Relation relation,
            final KunderaMetadata kunderaMetadata); static String getEnclosingEmbeddedFieldName(EntityMetadata m, String criteria, boolean viaColumnName,
            final KunderaMetadata kunderaMetadata); static boolean isEmbeddedAtributeIndexable(Field embeddedField); static boolean isColumnInEmbeddableIndexable(Field embeddedField, String columnFieldName); static boolean defaultTransactionSupported(final String persistenceUnit,
            final KunderaMetadata kunderaMetadata); static boolean isSchemaAttributeRequired(final String persistenceUnit, final KunderaMetadata kunderaMetadata); static boolean indexSearchEnabled(final String persistenceUnit, final KunderaMetadata kunderaMetadata); static boolean isBasicElementCollectionField(Field collectionField); static boolean containsBasicElementCollectionField(final EntityMetadata m,
            final KunderaMetadata kunderaMetadata); static void onJPAColumnMapping(final EntityType entityType, EntityMetadata entityMetadata); static boolean onCheckValidationConstraints(Field attribute); static boolean onCheckEmbeddableAttribute(Field attribute);  }### Answer:
@Test public void testSerializeKeys() { Set<String> foreignKeys = new LinkedHashSet<String>(); foreignKeys.add("key1"); foreignKeys.add("key2"); foreignKeys.add("key3"); String serializedKey = MetadataUtils.serializeKeys(foreignKeys); Assert.assertNotNull(serializedKey); Assert.assertEquals("key1~key2~key3", serializedKey); }