class SimpleFactory {

  @Updater
  @Recycle
  Simple simple(String appendix) throws IOException {
    return new Simple(string, appendix);
  }

}

class SimpleFactoryTest {

  private final SimpleFactory factory;
  private final SimpleUpdaterFactory updaterFactory;

  @Test
  public void simple() throws Exception {

    SimpleFactory.Simple simple = factory.simple("b");
    SimpleFactoryBuilders.SimpleUpdater updater = updaterFactory.updater(simple);
    SimpleFactory.Simple updatedSimple = updater
        .appendix("c")
        .done();
    assertThat(simple.concat(), is("ab"));
    assertThat(updatedSimple.concat(), is("ac"));
    // updater is recycled
    assertTrue(updater
        == updaterFactory.updater(factory.simple("x")));
  }

}