fix test case for travis on openjdk