@@ -0,0 +1,2124 @@
+package org.realityforge.replicant.client;%0A%0Aimport arez.Arez;%0Aimport arez.ArezTestUtil;%0Aimport arez.Observer;%0Aimport arez.ObserverError;%0Aimport java.util.ArrayList;%0Aimport java.util.stream.Collectors;%0Aimport javax.annotation.Nonnull;%0Aimport javax.annotation.Nullable;%0Aimport org.realityforge.braincheck.BrainCheckTestUtil;%0Aimport org.testng.annotations.AfterMethod;%0Aimport org.testng.annotations.BeforeMethod;%0Aimport static org.testng.Assert.*;%0A%0Apublic abstract class AbstractReplicantTest%0A%7B%0A  private final ArrayList%3CString%3E _observerErrors = new ArrayList%3C%3E();%0A  private boolean _ignoreObserverErrors;%0A  private boolean _printObserverErrors;%0A%0A  @BeforeMethod%0A  protected void beforeTest()%0A    throws Exception%0A  %7B%0A    BrainCheckTestUtil.resetConfig( false );%0A    ArezTestUtil.resetConfig( false );%0A    _ignoreObserverErrors = false;%0A    _printObserverErrors = true;%0A    _observerErrors.clear();%0A    Arez.context().addObserverErrorHandler( this::onObserverError );%0A  %7D%0A%0A  @AfterMethod%0A  protected void afterTest()%0A    throws Exception%0A  %7B%0A    BrainCheckTestUtil.resetConfig( true );%0A    ArezTestUtil.resetConfig( true );%0A    if ( !_ignoreObserverErrors && !_observerErrors.isEmpty() )%0A    %7B%0A      fail( %22Unexpected Observer Errors: %22 + _observerErrors.stream().collect( Collectors.joining( %22%5Cn%22 ) ) );%0A    %7D%0A  %7D%0A%0A  protected final void setIgnoreObserverErrors( final boolean ignoreObserverErrors )%0A  %7B%0A    _ignoreObserverErrors = ignoreObserverErrors;%0A  %7D%0A%0A  protected final void setPrintObserverErrors( final boolean printObserverErrors )%0A  %7B%0A    _printObserverErrors = printObserverErrors;%0A  %7D%0A%0A  private void onObserverError( @Nonnull final Observer observer,%0A                                @Nonnull final ObserverError error,%0A                                @Nullable final Throwable throwable )%0A  %7B%0A    final String message = %22Observer: %22 + observer.getName() + %22 Error: %22 + error + %22 %22 + throwable;%0A    _observerErrors.add( message );%0A    if ( _printObserverErrors )%0A    %7B%0A      System.out.println( message );%0A    %7D%0A  %7D%0A%0A  @Nonnull%0A  final ArrayList%3CString%3E getObserverErrors()%0A  %7B%0A    return _observerErrors;%0A  %7D%0A%7D%0A

Add base class useful for writing tests with Arez components