newDataPoints);
// Retrieve the hts contents from the master
HistoricalTimeSeriesInfoSearchRequest request = new HistoricalTimeSeriesInfoSearchRequest();
request.setExternalIdSearch(new ExternalIdSearch(EXISTING_HTSINFO_EXTERNALID));
HistoricalTimeSeriesInfoSearchResult result = htsMaster.search(request);
LocalDateDoubleTimeSeries retrievedDataPoints = null;
if (result != null && result.getFirstInfo() != null) {
retrievedDataPoints = htsMaster.getTimeSeries(
htsMaster.get(result.getFirstInfo().getUniqueId()).getInfo().getTimeSeriesObjectId().atLatestVersion()).getTimeSeries();
}
// Assert that the retrieved contents is as expected (combined existing and new dates/values)
LocalDate[] combinedDates = {LocalDate.of(2010,1,1), LocalDate.of(2010,2,1), LocalDate.of(2011,1,1), LocalDate.of(2011,2,1)};
double[] combinedValues = {1.0, 1.5, 2.0, 2.5};