Adding tests to OptionalType.java