CollectionCoder extends IterableLikeCoder<T, Collection<T>> { @Override public TypeDescriptor<Collection<T>> getEncodedTypeDescriptor() { return new TypeDescriptor<Collection<T>>() {}.where( new TypeParameter<T>() {}, getElemCoder().getEncodedTypeDescriptor()); } protected  CollectionCoder(Coder<T> elemCoder); static CollectionCoder<T> of(Coder<T> elemCoder); @Override TypeDescriptor<Collection<T>> getEncodedTypeDescriptor();  }
@Test public void testEncodedTypeDescriptor() throws Exception { TypeDescriptor<Collection<Integer>> expectedTypeDescriptor = new TypeDescriptor<Collection<Integer>>() {}; assertThat(TEST_CODER.getEncodedTypeDescriptor(), equalTo(expectedTypeDescriptor)); }