test cases for Hex.java