### Question:
RemoteOperations implements SessionOperations { public void setProperty(Session session, String name, String value) throws SessionException { if (debug.messageEnabled()) { debug.message(MessageFormat.format( "Remote setProperty {0} {1}={2}", session, name, value)); } SessionID sessionID = session.getID(); SessionRequest sreq = new SessionRequest( SessionRequest.SetProperty, sessionID.toString(), false); sreq.setPropertyName(name); sreq.setPropertyValue(value); if (SystemProperties.isServerMode() && InternalSession.isProtectedProperty(name) ) { try { SSOToken admSSOToken = SessionUtils.getAdminToken(); sreq.setRequester(RestrictedTokenContext.marshal(admSSOToken)); } catch (SSOException e) { throw new SessionException(e); } catch (Exception e) { throw new SessionException(e); } if (debug.messageEnabled()) { debug.message("Session.setProperty: " + "added admSSOToken in sreq to set " + "externalProtectedProperty in remote server"); } } requests.sendRequestWithRetry(session.getSessionServiceURL(), sreq, session); } @Inject  RemoteOperations(@Named(SessionConstants.SESSION_DEBUG) Debug debug, Requests requests); SessionInfo refresh(Session session, boolean reset); void logout(Session session); void destroy(Session requester, Session session); void setProperty(Session session, String name, String value);  }### Answer:
@Test public void shouldUseRequestsForSetProperty() throws SessionException { String name = "name"; String value = "value"; remoteOperations.setProperty(mockSession, name, value); verify(mockRequests).sendRequestWithRetry(nullable(URL.class), any(SessionRequest.class), eq(mockSession)); }
@Test public void shouldUseRequestsForSetProperty() throws SessionException { String name = "name"; String value = "value"; remoteOperations.setProperty(mockSession, name, value); verify(mockRequests).sendRequestWithRetry(any(URL.class), any(SessionRequest.class), eq(mockSession)); }