@Test public void testStartsCuratorOnStart() throws Exception { CuratorFramework curator = mock(CuratorFramework.class); when(curator.getState()).thenReturn(CuratorFrameworkState.LATENT); ManagedCuratorFramework managed = new ManagedCuratorFramework(curator); managed.start(); verify(curator).start(); }
@Override public void start() throws Exception { if (_curator.getState() == CuratorFrameworkState.LATENT) { _curator.start(); } }
ManagedCuratorFramework implements Managed { @Override public void start() throws Exception { if (_curator.getState() == CuratorFrameworkState.LATENT) { _curator.start(); } } }
ManagedCuratorFramework implements Managed { @Override public void start() throws Exception { if (_curator.getState() == CuratorFrameworkState.LATENT) { _curator.start(); } } ManagedCuratorFramework(CuratorFramework curator); }
ManagedCuratorFramework implements Managed { @Override public void start() throws Exception { if (_curator.getState() == CuratorFrameworkState.LATENT) { _curator.start(); } } ManagedCuratorFramework(CuratorFramework curator); @Override void start(); @Override void stop(); }
ManagedCuratorFramework implements Managed { @Override public void start() throws Exception { if (_curator.getState() == CuratorFrameworkState.LATENT) { _curator.start(); } } ManagedCuratorFramework(CuratorFramework curator); @Override void start(); @Override void stop();  }