### Question:
SessionService { public UserDataRequest getSession( Credentials credentials, DeviceId devId, ActiveSyncRequest request) throws DaoException { String sessionId = credentials.getUser().getLoginAtDomain() + "/" + devId; return createSession(credentials, request, sessionId); } @Inject @VisibleForTesting  SessionService(DeviceService deviceService, UserDataRequest.Factory userDataRequestFactory); UserDataRequest getSession(
			Credentials credentials, DeviceId devId, ActiveSyncRequest request);  }### Answer:
@Test public void testEnsureThatGetSessionDontCallCloseResources() throws DaoException { userDataRequest = createMock(UserDataRequest.class); replay(userDataRequest); SessionService sessionService = createSessionService(); UserDataRequest userDataRequest = sessionService.getSession(credentials, deviceId, activeSyncRequest); assertThat(userDataRequest).isNotNull(); }