Refactor test cases, include optional support.