@Test public void testStartShouldBeCalledIfAlreadyStarted() throws Exception { final TestAccountConnection connection = new TestAccountConnection(); connection.start(); assertEquals(1, connection.startCounter.get()); connection.start(); assertEquals(2, connection.startCounter.get()); }
@Override public final void start() throws AccountConnectionException { stopped.compareAndSet(true, false); stopping.set(false); start0(); }
BaseAccountConnection implements AccountConnection { @Override public final void start() throws AccountConnectionException { stopped.compareAndSet(true, false); stopping.set(false); start0(); } }
BaseAccountConnection implements AccountConnection { @Override public final void start() throws AccountConnectionException { stopped.compareAndSet(true, false); stopping.set(false); start0(); } protected  BaseAccountConnection(@Nonnull A account, @Nonnull Context context); protected  BaseAccountConnection(@Nonnull A account, @Nonnull Context context, int retryCount); }
BaseAccountConnection implements AccountConnection { @Override public final void start() throws AccountConnectionException { stopped.compareAndSet(true, false); stopping.set(false); start0(); } protected  BaseAccountConnection(@Nonnull A account, @Nonnull Context context); protected  BaseAccountConnection(@Nonnull A account, @Nonnull Context context, int retryCount); @Nonnull final A getAccount(); void setAccount(@Nonnull A account); boolean isStopped(); @Override final void start(); @Override final void stop(); @Override final void stopDelayed(); @Override boolean isInternetConnectionRequired(); @Override int getRetryCount(); }
BaseAccountConnection implements AccountConnection { @Override public final void start() throws AccountConnectionException { stopped.compareAndSet(true, false); stopping.set(false); start0(); } protected  BaseAccountConnection(@Nonnull A account, @Nonnull Context context); protected  BaseAccountConnection(@Nonnull A account, @Nonnull Context context, int retryCount); @Nonnull final A getAccount(); void setAccount(@Nonnull A account); boolean isStopped(); @Override final void start(); @Override final void stop(); @Override final void stopDelayed(); @Override boolean isInternetConnectionRequired(); @Override int getRetryCount();  }