### Question:
SimpleRESTEncoder extends AbstractRESTEncoder { public <S extends Span> void encodeEach2D(List<? extends List<S>> spans) throws IOException { encodeEach2D(spans, Span::getText); } protected  SimpleRESTEncoder(String id);  SimpleRESTEncoder(String id, RESTAdapter restAdapter, Class<? extends Span> elementClass);  SimpleRESTEncoder(String id, RESTAdapter restAdapter, String vectorIdentifier, Class<? extends Span> elementClass); @Override INDArray encode(String word); abstract INDArray encodeImpl(String word); @Override INDArray encode(Span span); abstract INDArray encodeImpl(Span span); @Override void encodeEach(Sentence input, Class<? extends Span> elementClass); abstract void encodeEachImpl(Sentence input); @Override void encodeEach(Document input, Class<? extends Span> elementClass); abstract void encodeEachImpl(Document input); @Override void encodeEach(Collection<Document> docs, Class<? extends Span> elementClass); abstract void encodeEachImpl(Collection<Document> docs); INDArray encodeValue(String value); List<List<Token>> getTokensOfSentencesOfDocument(Document document); Stream<Stream<Token>> streamTokensOfSentencesOfDocument(Document document); Stream<Stream<S>> streamSpans2D(List<? extends List<S>> spans2D); void encodeEach(S span); void encodeEach(S span, Function<S, String> getText); void encodeEach1D(List<S> spans); void encodeEach1D(List<S> spans, Function<S, String> getText); void encodeEach2D(List<? extends List<S>> spans); void encodeEach2D(List<? extends List<S>> spans, Function<S, String> getText); String[] spansToStringArray1D(Stream<S> spans); String[] spansToStringArray1D(Stream<S> spans, Function<S, String> getText); String[][] spansToStringArray2D(Stream<? extends Stream<S>> spans); String[][] spansToStringArray2D(Stream<? extends Stream<S>> spans, Function<S, String> getText); void putVectorInSpan(S span, double[] data); void putVectorInSpans(Stream<S> spans, double[][] data); void putVectorInSpans(Stream<? extends Stream<S>> spans, double[][][] data);  }### Answer:
@Test public void encodeEach2DTest() throws IOException { simpleRESTEncoder.encodeEach2D(dummySpan2D); verify(restAdapter, times(1)).encode(Mockito.any(String[][].class)); for(List<DummySpan> span1D: dummySpan2D){ for(Span span : span1D){ verifySpanVector(span); } } }