### Question:
AgentSessionManager { public String getSessionId(Long hostId) throws HostNotRegisteredException { Preconditions.checkNotNull(hostId); String sessionId = registeredSessionIds.get(hostId); if (sessionId != null) { return sessionId; } throw HostNotRegisteredException.forHostId(hostId); }  void register(String sessionId, Host host); boolean isRegistered(String sessionId); Host getHost(String sessionId); String getSessionId(Long hostId); void unregisterByHost(Long hostId);  }### Answer:
@Test(expected = HostNotRegisteredException.class) public void exceptionThrownForUnknownHost() throws HostNotRegisteredException { Long notRegisteredHostId = 2L; underTest.getSessionId(notRegisteredHostId); }