updated the gremlin-java test cases to support both the optimized and unoptimized representations of gremlin pipelines.