@Test public void testClose$circuitBreak() throws Exception { new Expectations() {{ delegate.close();times=1; listener.onDispose(sut);times=1; }}; this.sut.close(); this.sut.close(); }
@Override public synchronized void close() throws SessionTerminationException { if(this.disposed) { return; } doDispose(); }
ContextWriteSessionState implements WriteSession { @Override public synchronized void close() throws SessionTerminationException { if(this.disposed) { return; } doDispose(); } }
ContextWriteSessionState implements WriteSession { @Override public synchronized void close() throws SessionTerminationException { if(this.disposed) { return; } doDispose(); } ContextWriteSessionState(WriteSession delegate, ContextWriteSessionStateListener listener); }
ContextWriteSessionState implements WriteSession { @Override public synchronized void close() throws SessionTerminationException { if(this.disposed) { return; } doDispose(); } ContextWriteSessionState(WriteSession delegate, ContextWriteSessionStateListener listener); @Override synchronized S resolve(Class<? extends S> snapshotClass, Individual<?, ?> individual); @Override synchronized S find(Class<? extends S> snapshotClass, Name<?> id, Class<? extends ResourceHandler> handlerClass); @Override synchronized void modify(ResourceSnapshot resource); @Override synchronized void delete(ResourceSnapshot resource); @Override synchronized void saveChanges(); @Override synchronized void discardChanges(); @Override synchronized void close(); @Override synchronized String toString(); }
ContextWriteSessionState implements WriteSession { @Override public synchronized void close() throws SessionTerminationException { if(this.disposed) { return; } doDispose(); } ContextWriteSessionState(WriteSession delegate, ContextWriteSessionStateListener listener); @Override synchronized S resolve(Class<? extends S> snapshotClass, Individual<?, ?> individual); @Override synchronized S find(Class<? extends S> snapshotClass, Name<?> id, Class<? extends ResourceHandler> handlerClass); @Override synchronized void modify(ResourceSnapshot resource); @Override synchronized void delete(ResourceSnapshot resource); @Override synchronized void saveChanges(); @Override synchronized void discardChanges(); @Override synchronized void close(); @Override synchronized String toString();  }