final Field nameField = CorrectEmbeddedReversedKey.class.getDeclaredField("name");
final Field rankField = CorrectEmbeddedReversedKey.class.getDeclaredField("rank");
final Field countField = CorrectEmbeddedReversedKey.class.getDeclaredField("count");
parser = new EmbeddedIdParser(new PropertyParsingContext(context, nameField));
EmbeddedIdProperties props = parser.parseEmbeddedId(CorrectEmbeddedReversedKey.class, propertyParser);
final PartitionComponents partitionComponents = props.getPartitionComponents();
assertThat(partitionComponents.getComponentClasses()).containsExactly(String.class);
assertThat(partitionComponents.getComponentFields()).containsExactly(nameField);
assertThat(partitionComponents.getComponentNames()).containsExactly("name");
assertThat(partitionComponents.getCQL3ComponentNames()).containsExactly("name");
final ClusteringComponents clusteringComponents = props.getClusteringComponents();
assertThat(clusteringComponents.getComponentClasses()).containsExactly(int.class, int.class);
assertThat(clusteringComponents.getComponentFields()).containsExactly(rankField, countField);
assertThat(clusteringComponents.getComponentNames()).containsExactly("rank", "count");
assertThat(clusteringComponents.getCQL3ComponentNames()).containsExactly("rank", "count");
assertThat(clusteringComponents.getClusteringOrders()).containsExactly(new ClusteringOrder("rank", Sorting.DESC), new ClusteringOrder("count", Sorting.DESC));