Add tests for pocheck and refactored pocheck accordingly.