Fixed duplicate interfaces, improved InterfaceTest case 

Your commit earlier was correct, but you broke it when you merged my incorrect fix. This pull request fixes that inadvertent problem, and greatly improves `InterfaceTest.java` to search for duplicates and additional cases.