HostRegistryImpl implements HostRegistry { @Override public HostInfo getHostInfoById( final String hostId ) throws HostDisconnectedException { try { return getContainerHostInfoById( hostId ); } catch ( HostDisconnectedException e ) { return getResourceHostInfoById( hostId ); } }  @Override void updateResourceHostEntryTimestamp( final String resourceHostId ); @Override ContainerHostInfo getContainerHostInfoById( final String id ); @Override ContainerHostInfo getContainerHostInfoByHostname( final String hostname ); @Override ContainerHostInfo getContainerHostInfoByContainerName( final String containerName ); @Override Set<ContainerHostInfo> getContainerHostsInfo(); @Override ResourceHostInfo getResourceHostInfoById( final String id ); @Override ResourceHostInfo getResourceHostInfoByHostname( final String hostname ); @Override Set<ResourceHostInfo> getResourceHostsInfo(); @Override ResourceHostInfo getResourceHostByContainerHost( final ContainerHostInfo containerHostInfo ); @Override HostInfo getHostInfoById( final String hostId ); @Override void removeResourceHost( final String id ); @Override void addHostListener( final HostListener listener ); @Override void removeHostListener( final HostListener listener ); void init(); void dispose(); @Override boolean pingHost( String hostIp );  }
@Test public void testGetHostInfoById() throws Exception { assertNotNull( registry.getHostInfoById( CONTAINER_ID ) ); assertNotNull( registry.getHostInfoById( HOST_ID ) ); try { registry.getHostInfoById( UUID.randomUUID().toString() ); fail( "Expected HostDisconnectedException" ); } catch ( HostDisconnectedException e ) { } }