### Question:
OpenSessions { @VisibleForTesting Session getOrCreateSession(String desktopId) { Session session = sessions.get(desktopId); if (session == null) { session = createSession(); session.setFlushMode(FlushMode.MANUAL); } return session; } OpenSessions(SessionFactory sessionFactory); void openSession(String desktopId); void unbindSession(); void closeSession(String desktopId);  }### Answer:
@Test public void getOrCreateSessionShouldGet() throws Exception { Session session = givenSutWithSession(sut, "desktop-id"); org.hibernate.Session resultSession = sut.getOrCreateSession("desktop-id"); assertSame(resultSession, session); }