Add tests

Add tests for detrmine foreign keys #9