S3TaskClientImpl implements S3TaskClient { @Override public GetUrlTaskResult getHlsUrl(String spaceId, String contentId) throws ContentStoreException { final GetHlsUrlTaskParameters params = new GetHlsUrlTaskParameters(); params.setSpaceId(spaceId); params.setContentId(contentId); return GetUrlTaskResult.deserialize( contentStore.performTask(StorageTaskConstants.GET_HLS_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 testGetHlsUrl() throws Exception { String taskName = StorageTaskConstants.GET_HLS_URL_TASK_NAME; final String streamUrl = "stream-url"; GetUrlTaskResult preparedResult = new GetUrlTaskResult(); preparedResult.setStreamUrl(streamUrl); setupMock(taskName, preparedResult.serialize()); replayMocks(); GetUrlTaskResult result = taskClient.getHlsUrl(spaceId, "content"); assertThat(streamUrl, equalTo(result.getStreamUrl())); }