S3TaskClientImpl implements S3TaskClient { @Override public GetSignedCookiesUrlTaskResult getSignedCookiesUrl(String spaceId, String ipAddress, int minutesToExpire, String redirectUrl) throws ContentStoreException { final GetSignedCookiesUrlTaskParameters params = new GetSignedCookiesUrlTaskParameters(); params.setSpaceId(spaceId); params.setIpAddress(ipAddress); params.setMinutesToExpire(minutesToExpire); params.setRedirectUrl(redirectUrl); return GetSignedCookiesUrlTaskResult.deserialize( contentStore.performTask(StorageTaskConstants.GET_SIGNED_COOKIES_URL_TASK_NAME, params.serialize())); } S3TaskClientImpl(ContentStore contentStore); @Override EnableStreamingTaskResult enableStreaming(String spaceId, boolean secure); @Override DisableStreamingTaskResult disableStreaming(String spaceId); @Override DeleteStreamingTaskResult deleteStreaming(String spaceId); @Override GetUrlTaskResult getUrl(String spaceId,
                                   String contentId,
                                   String resourcePrefix); @Override GetSignedUrlTaskResult getSignedUrl(String spaceId,
                                               String contentId,
                                               String resourcePrefix); @Override GetSignedUrlTaskResult getSignedUrl(String spaceId,
                                               String contentId,
                                               String resourcePrefix,
                                               int minutesToExpire,
                                               String ipAddress); @Override EnableStreamingTaskResult enableHlsStreaming(String spaceId, boolean secure); @Override DisableStreamingTaskResult disableHlsStreaming(String spaceId); @Override DeleteStreamingTaskResult deleteHlsStreaming(String spaceId); @Override GetUrlTaskResult getHlsUrl(String spaceId, String contentId); @Override GetSignedCookiesUrlTaskResult getSignedCookiesUrl(String spaceId,
                                                             String ipAddress,
                                                             int minutesToExpire,
                                                             String redirectUrl);  }
@Test public void testGetSignedCookiesUrl() throws Exception { final String taskName = StorageTaskConstants.GET_SIGNED_COOKIES_URL_TASK_NAME; final int minutesToExpiration = 10; final String ipAddress = "0.0.0.0"; final String redirectUrl = "https: GetSignedCookiesUrlTaskResult preparedResult = new GetSignedCookiesUrlTaskResult(); String signedCookiesUrl = "https: preparedResult.setSignedCookiesUrl(signedCookiesUrl); setupMock(taskName, preparedResult.serialize()); replayMocks(); GetSignedCookiesUrlTaskResult result = taskClient.getSignedCookiesUrl(spaceId, ipAddress, minutesToExpiration, redirectUrl); assertThat(signedCookiesUrl, equalTo(result.getSignedCookiesUrl())); }