@Test public void should_get_last_partition_key_name() throws Exception { // Given when(compoundPKProperties.getPartitionComponents().getCQLComponentNames()) .thenReturn(Arrays.asList("id", "date", "type")); // When final String lastPartitionKeyName = view.getLastPartitionKeyName(); // Then assertThat(lastPartitionKeyName).isEqualTo("type"); }
@Test public void should_get_partition_key_names() throws Exception { // Given when(compoundPKProperties.getPartitionComponents().getCQLComponentNames()) .thenReturn(Arrays.asList("id", "date", "type")); // When final List<String> partitionKeysName = view.getPartitionKeysName(2); // Then assertThat(partitionKeysName).containsExactly("id", "date"); }