TupleTag implements Serializable { public String getId() { return id; } TupleTag();  TupleTag(String id); private  TupleTag(String id, boolean generated); String getId(); String getOutName(int outIndex); TypeDescriptor<V> getTypeDescriptor(); @Override boolean equals(@Nullable Object that); @Override int hashCode(); @Override String toString();  }
@Test public void testStaticTupleTag() { assertEquals("org.apache.beam.sdk.values.TupleTagTest#0", staticTag.getId()); assertEquals("org.apache.beam.sdk.values.TupleTagTest#3", staticBlockTag.getId()); assertEquals("org.apache.beam.sdk.values.TupleTagTest#1", staticMethodTag.getId()); assertEquals("org.apache.beam.sdk.values.TupleTagTest#2", instanceMethodTag.getId()); assertEquals( "org.apache.beam.sdk.values.TupleTagTest$AnotherClass#0", AnotherClass.anotherTag.getId()); }
@Test public void testNonstaticTupleTag() { assertNotEquals(new TupleTag<>().getId(), new TupleTag<>().getId()); assertNotEquals(createNonstaticTupleTag(), createNonstaticTupleTag()); TupleTag<Object> tag = createNonstaticTupleTag(); assertThat( Iterables.get(Splitter.on('#').split(tag.getId()), 0), startsWith("org.apache.beam.sdk.values.TupleTagTest.createNonstaticTupleTag")); assertThat( Integer.parseInt( Iterables.get( Splitter.on(':').split(Iterables.get(Splitter.on('#').split(tag.getId()), 0)), 1)), greaterThan(15)); }