diff --git a/zipkin-java-query/pom.xml b/zipkin-java-query/pom.xml
index 5d41dc58f9f..b207667cea2 100644
--- a/zipkin-java-query/pom.xml
+++ b/zipkin-java-query/pom.xml
@@ -29,6 +29,12 @@
Zipkin Java QueryZipkin Java Query
+
+
+ 1.9.0
+ 2.2.5
+
+
${project.groupId}
@@ -39,5 +45,59 @@
com.facebook.swiftswift-annotations
+
+
+
+ ${project.groupId}
+ swift-codec
+
+
+
+
+ io.zipkin
+ zipkin-common
+ ${zipkin-scala.version}
+ test
+
+
+ org.apache.thrift
+ libthrift
+
+
+
+
+
+ io.zipkin
+ zipkin-scrooge
+ ${zipkin-scala.version}
+ test
+
+
+ org.apache.thrift
+ libthrift
+
+
+
+
+
+ io.zipkin
+ zipkin-common
+ ${zipkin-scala.version}
+ test
+ test
+
+
+ org.apache.thrift
+ libthrift
+
+
+
+
+
+ org.scalatest
+ scalatest_2.10
+ ${scalatest.version}
+ test
+
diff --git a/zipkin-java-query/src/test/java/io/zipkin/query/InMemoryZipkinQuerySpanStoreTest.java b/zipkin-java-query/src/test/java/io/zipkin/query/InMemoryZipkinQuerySpanStoreTest.java
new file mode 100644
index 00000000000..ba5749f2d68
--- /dev/null
+++ b/zipkin-java-query/src/test/java/io/zipkin/query/InMemoryZipkinQuerySpanStoreTest.java
@@ -0,0 +1,29 @@
+/**
+ * Copyright 2015 The OpenZipkin Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package io.zipkin.query;
+
+import com.twitter.zipkin.storage.SpanStore;
+import com.twitter.zipkin.storage.SpanStoreSpec;
+
+public class InMemoryZipkinQuerySpanStoreTest extends SpanStoreSpec {
+ private ZipkinQuerySpanStoreAdapter mem;
+
+ public SpanStore store() {
+ return mem;
+ }
+
+ public void clear() {
+ mem = new ZipkinQuerySpanStoreAdapter<>(new InMemoryZipkinQuery());
+ }
+}
diff --git a/zipkin-java-query/src/test/java/io/zipkin/query/ZipkinQuerySpanStoreAdapter.java b/zipkin-java-query/src/test/java/io/zipkin/query/ZipkinQuerySpanStoreAdapter.java
new file mode 100644
index 00000000000..6578a77b288
--- /dev/null
+++ b/zipkin-java-query/src/test/java/io/zipkin/query/ZipkinQuerySpanStoreAdapter.java
@@ -0,0 +1,158 @@
+/**
+ * Copyright 2015 The OpenZipkin Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package io.zipkin.query;
+
+import com.facebook.swift.codec.ThriftCodec;
+import com.facebook.swift.codec.ThriftCodecManager;
+import com.twitter.util.Future;
+import com.twitter.zipkin.common.Span;
+import com.twitter.zipkin.conversions.thrift;
+import com.twitter.zipkin.storage.IndexedTraceId;
+import com.twitter.zipkin.storage.SpanStore;
+import com.twitter.zipkin.thriftscala.Span$;
+import io.zipkin.Annotation;
+import io.zipkin.Trace;
+import io.zipkin.internal.Nullable;
+import java.nio.ByteBuffer;
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
+import org.apache.thrift.protocol.TBinaryProtocol;
+import org.apache.thrift.transport.TMemoryBuffer;
+import scala.Option;
+import scala.collection.Iterator;
+import scala.collection.JavaConversions;
+import scala.collection.Seq;
+import scala.collection.immutable.Set;
+import scala.runtime.BoxedUnit;
+
+import static java.util.Collections.emptyList;
+import static java.util.Collections.emptyMap;
+import static java.util.Collections.singletonList;
+import static java.util.Collections.singletonMap;
+
+/**
+ * Adapts {@link ZipkinQuery} to a scala/scrooge {@link com.twitter.zipkin.storage.SpanStore} in
+ * order to test against its {@link com.twitter.zipkin.storage.SpanStoreSpec} for interoperability
+ * reasons.
+ */
+public final class ZipkinQuerySpanStoreAdapter>> extends SpanStore {
+ private static final ThriftCodec spanCodec = new ThriftCodecManager().getCodec(io.zipkin.Span.class);
+
+ private final T spanStore;
+
+ public ZipkinQuerySpanStoreAdapter(T spanStore) {
+ this.spanStore = spanStore;
+ }
+
+ @Override
+ public Future>> getSpansByTraceIds(Seq