[BZ-1078146] fix test failing with Java8