[Minor] fixed test which breaks on Java8