### Question:
LoginSession { public LoginSession(String userId) { this.userId = userId; } LoginSession(String userId); String create(int timeout); String create(); String validate(String token); void destroy();  }### Answer:
@Test public void testLoginSession() { LoginSession session = new LoginSession("bingo"); String token = session.create(); String res = session.validate("this is a wrong token"); assertEquals("SESSION_TOKEN_INCORRECT", res); res = session.validate(token); assertEquals("SESSION_TOKEN_CORRECT", res); session.destroy(); res = session.validate(token); assertEquals("SESSION_NOT_LOGIN", res); }