@Test public void testClosed_To_Stopped() throws Exception { MockConnection channel = new MockConnection(); ClosedState state = ClosedState.getInstance(); state.requestStop(channel); assertEquals(ClosedState.getInstance(), channel.retrieveComponentState()); assertEquals(0, channel.getInitCount()); assertEquals(0, channel.getStartCount()); assertEquals(0, channel.getStopCount()); assertEquals(0, channel.getCloseCount()); }
public static ClosedState getInstance() { if (instance == null) { instance = new ClosedState(); } return instance; }
ClosedState extends ComponentStateImp { public static ClosedState getInstance() { if (instance == null) { instance = new ClosedState(); } return instance; } }
ClosedState extends ComponentStateImp { public static ClosedState getInstance() { if (instance == null) { instance = new ClosedState(); } return instance; } private  ClosedState(); }
ClosedState extends ComponentStateImp { public static ClosedState getInstance() { if (instance == null) { instance = new ClosedState(); } return instance; } private  ClosedState(); @Override void requestInit(StateManagedComponent comp); @Override void requestStart(StateManagedComponent comp); static ClosedState getInstance(); }
ClosedState extends ComponentStateImp { public static ClosedState getInstance() { if (instance == null) { instance = new ClosedState(); } return instance; } private  ClosedState(); @Override void requestInit(StateManagedComponent comp); @Override void requestStart(StateManagedComponent comp); static ClosedState getInstance();  }