@Test
public void testParseForeignKeyDefinitions() {

    String inputFile = Thread.currentThread().getContextClassLoader().getResource("foreign-keys.sql").getFile();
    Collection<ForeignKeyDefinition> primaryKeyDefinitions = SQLParser.parseForeignKeys(inputFile);
    Assert.assertEquals(
            new HashSet<>(Arrays.asList(
                    new ForeignKeyDefinition(
                            "dep1", Collections.singletonList("that_id"),
                            "ref1", Collections.singletonList("id")
                    ),
                    new ForeignKeyDefinition(
                            "dep2", Collections.singletonList("that_id"),
                            "ref2", Collections.singletonList("id")
                    ),
                    new ForeignKeyDefinition(
                            "dep3", Arrays.asList("first_name", "last_name"),
                            "ref3", Arrays.asList("fn", "ln")
                    ),
                    new ForeignKeyDefinition(
                            "dep4", Collections.singletonList("that_oid"),
                            "ref4", Collections.singletonList("oid")
                    ),
                    new ForeignKeyDefinition(
                            "dep5", Arrays.asList("first_name", "last_name"),
                            "ref5", Arrays.asList("fn", "ln")
                    )
            )),
            new HashSet<>(primaryKeyDefinitions)
    );
}