Add test cases for Java SE8