@Test
public void testSend() throws Exception {

  Mutation.Metadata metadata = mock(Mutation.Metadata.class);
  when(firstMutation.getMetadata()).thenReturn(metadata);
  when(secondMutation.getMetadata()).thenReturn(metadata);
  when(thirdMutation.getMetadata()).thenReturn(metadata);
  when(metadata.getTimestamp()).thenReturn(0L);
  destination.send(mutations);
  assertEquals(3, destination.getPublishedMutations());
  assertEquals(thirdMutation, destination.getLastPublishedMutation());
  verify(metrics).publishSucceeded(mutations);
  verify(listener).onSend(mutations);
}