add JUnit test cases, deprecate ErrorHandler methods that do not take an Errors enum.