@Test
public void testImportUccsFromJson() throws Exception {

    DefaultMetadataStore metadataStore = new DefaultMetadataStore();
    Schema schema = metadataStore.addSchema("schema", "", new DefaultLocation());
    Table table = schema.addTable(metadataStore, "table", "", new DefaultLocation());
    Column id = table.addColumn(metadataStore, "id", "", 0);
    Column name = table.addColumn(metadataStore, "name", "", 1);
    Column zip = table.addColumn(metadataStore, "zip", "", 2);
    File inputFile = new File(Thread.currentThread().getContextClassLoader().getResource("metanome-uccs.json").toURI());
    MetanomeDependencyImportApp.fromParameters(
            metadataStore,
            inputFile.getAbsolutePath(),
            ".+",
            "json",
            "UCC",
            "schema",
            "schema",
            null
    );
    Collection<ConstraintCollection<UniqueColumnCombination>> constraintCollections =
            metadataStore.getConstraintCollectionByConstraintTypeAndScope(
                    UniqueColumnCombination.class, metadataStore.getTargetByName("schema.table")
            );
    Assert.assertEquals(1, constraintCollections.size());
    ConstraintCollection<UniqueColumnCombination> constraintCollection = constraintCollections.iterator().next();
    Assert.assertEquals(2, constraintCollection.getConstraints().size());
    Set<UniqueColumnCombination> discoveredInds = new HashSet<>(constraintCollection.getConstraints());
    Set<UniqueColumnCombination> expectedInds = new HashSet<>();
    expectedInds.add(new UniqueColumnCombination(ReferenceUtils.toIntArray(new Column[]{id})));
    expectedInds.add(new UniqueColumnCombination(ReferenceUtils.toIntArray(new Column[]{name, zip})));
    Assert.assertEquals(expectedInds, discoveredInds);
}