Changed java test to verify each element