public static Set<String> getSegmentNamesForTable(String tableNameWithType, long startTimestamp, long endTimestamp,
      boolean excludeOverlapping, URI controllerBaseURI, @Nullable AuthProvider authProvider)
      throws Exception {
    String rawTableName = TableNameBuilder.extractRawTableName(tableNameWithType);
    TableType tableType = TableNameBuilder.getTableTypeFromTableName(tableNameWithType);
    SSLContext sslContext = MinionContext.getInstance().getSSLContext();
    try (FileUploadDownloadClient fileUploadDownloadClient = new FileUploadDownloadClient(sslContext)) {
      Map<String, List<String>> tableTypeToSegmentNames =
          fileUploadDownloadClient.getSegments(controllerBaseURI, rawTableName, tableType, true, startTimestamp,
              endTimestamp, excludeOverlapping, authProvider);
      if (tableTypeToSegmentNames != null && !tableTypeToSegmentNames.isEmpty()) {
        List<String> allSegmentNameList = tableTypeToSegmentNames.get(tableType.toString());
        if (!CollectionUtils.isEmpty(allSegmentNameList)) {
          return new HashSet<>(allSegmentNameList);
        }
      }
      return Collections.emptySet();
    }
  }
@Test
  public void testNonExistentSegments()
      throws Exception {
    Assert.assertEquals(
        SegmentConversionUtils.getSegmentNamesForTable(TEST_TABLE_WITHOUT_TYPE + "_" + TEST_TABLE_TYPE,
        FileUploadDownloadClient.getURI(TEST_SCHEME, TEST_HOST, TEST_PORT), null),
        ImmutableSet.of(TEST_TABLE_SEGMENT_1, TEST_TABLE_SEGMENT_2));
  }