Java 8 support tests' refactor.