public String getId() {
    return id;
  }
@Test
  public void testNonstaticTupleTag() {
    assertNotEquals(new TupleTag<>().getId(), new TupleTag<>().getId());
    assertNotEquals(createNonstaticTupleTag(), createNonstaticTupleTag());

    TupleTag<Object> tag = createNonstaticTupleTag();

    // Check that the name is derived from the method it is created in.
    assertThat(
        Iterables.get(Splitter.on('#').split(tag.getId()), 0),
        startsWith("org.apache.beam.sdk.values.TupleTagTest.createNonstaticTupleTag"));

    // Check that after the name there is a ':' followed by a line number, and just make
    // sure the line number is big enough to be reasonable, so superficial changes don't break
    // the test.
    assertThat(
        Integer.parseInt(
            Iterables.get(
                Splitter.on(':').split(Iterables.get(Splitter.on('#').split(tag.getId()), 0)), 1)),
        greaterThan(15));
  }