### Question:
DestructiveSource { public List<String> getPartitionNames() throws TException { try (CloseableMetaStoreClient client = sourceMetaStoreClientSupplier.get()) { return client.listPartitionNames(databaseName, tableName, ALL); } } DestructiveSource(
      Supplier<CloseableMetaStoreClient> sourceMetaStoreClientSupplier,
      TableReplication tableReplication); boolean tableExists(); List<String> getPartitionNames();  }### Answer:
@Test public void getPartitionNames() throws Exception { List<String> expectedPartitionNames = Lists.newArrayList("partition1=value1"); when(client.listPartitionNames(DATABASE, TABLE, (short) -1)).thenReturn(expectedPartitionNames); DestructiveSource source = new DestructiveSource(sourceMetaStoreClientSupplier, tableReplication); assertThat(source.getPartitionNames(), is(expectedPartitionNames)); verify(client).close(); }