@Test
  public void testListPartitionsAll() throws Exception {
    List<List<String>> testValues = createTable4PartColsParts(client).testValues;
    List<Partition> partitions = client.listPartitions(DB_NAME, TABLE_NAME, (short)-1);
    assertPartitionsHaveCorrectValues(partitions, testValues);
    assertPartitionsHaveCorrectParams(partitions);

    partitions = client.listPartitions(DB_NAME, TABLE_NAME, (short)1);
    assertPartitionsHaveCorrectValues(partitions, testValues.subList(0, 1));
    assertPartitionsHaveCorrectParams(partitions);

    partitions = client.listPartitions(DB_NAME, TABLE_NAME, (short) 0);
    assertTrue(partitions.isEmpty());
  }
Testing listPartitions(String,String,short) ->
        get_partitions(String,String,short).
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/client/TestListPartitions.java