@Test
public void testMutationInOrder() throws Exception {

  List<Mutation> unorderedMutations = Lists.newArrayList();
  when(firstMetadata.getId()).thenReturn(1L);
  when(secondMetadata.getId()).thenReturn(2L);
  MutationOrderValidator validator = new MutationOrderValidator(unorderedMutations::add);
  validator.validate(firstMutation);
  validator.validate(secondMutation);
  assertTrue(unorderedMutations.isEmpty());
}