SessionDaoImpl implements SessionDao { @Override public void updateSessionStatus(final String deviceId, final SessionStatus status) throws UnknownSessionException { StreamingSession session = getSession(deviceId); session.setStatus(status); } SessionDaoImpl(); @Override void initSession(final String deviceId, final String contentUrl, final String contentName); @Override void updateSessionStatus(final String deviceId, final SessionStatus status); @Override void updateSessionPosition(final String deviceId, final Long position, final Long duration); @Override void removeDevice(final String deviceId); @Override StreamingSession getSession(final String deviceId); @Override Map<String, StreamingSession> getSessions();  }
@Test public void testUpdateSessionStatus() throws UnknownSessionException { SessionDaoImpl sessionDao = new SessionDaoImpl(); sessionDao.initSession("deviceId", "contentUrl", "contentName"); sessionDao.updateSessionStatus("deviceId", PLAYING); StreamingSession session = sessionDao.getSession("deviceId"); assertNotNull(session); assertTrue(session.getStatus() == PLAYING); }