InitializerImpl implements Initializer { @Override public List<String> getCode() { return code; } InitializerImpl(); protected  InitializerImpl(Initializer prototype); @Override Initializer setParent(HasInitializers<?> parent); @Override Optional<HasInitializers<?>> getParent(); @Override List<Import> getImports(); @Override List<String> getCode(); @Override Set<Modifier> getModifiers(); @Override InitializerImpl copy(); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test void getCode() { final String code = "a++;"; assertTrue(instance().getCode().isEmpty()); instance().add(code); assertEquals(singletonList(code), instance().getCode()); }