Add test for jdk 8's Optional class.