@Test
public void addPartition() throws Exception {

  doReturn(addedPartition).when(metaStoreClient).add_partition(any());
  doReturn(URI.create("resolved/location")).when(locationResolver).resolveLocation(LOCATION, false);
  doReturn(Instant.ofEpochSecond(1526462225L)).when(clock).instant();
  Partition result = underTest.addPartition(TABLE, PARTITION_VALUES, LOCATION).get();
  ArgumentCaptor<Partition> captor = ArgumentCaptor.forClass(Partition.class);
  verify(metaStoreClient).add_partition(captor.capture());
  Partition partition = captor.getValue();
  assertThat(partition.getParameters().get("data-highway.version"), is(DataHighwayVersion.VERSION));
  assertThat(partition.getParameters().get("data-highway.last-revision"), is("2018-05-16T09:17:05Z"));
  assertThat(partition.getSd().getLocation(), is("resolved/location"));
  assertThat(result, is(addedPartition));
}