@Test
public void happyPath() throws IOException {

  when(keySupplier.get()).thenReturn(KEY);
  when(outputStreamFactory.apply(KEY)).thenReturn(outputStream);
  underTest.performBackup();
  InOrder inOrder = inOrder(mapper, keySupplier, outputStreamFactory, outputStream);
  inOrder.verify(keySupplier).get();
  inOrder.verify(outputStreamFactory).apply(KEY);
  inOrder.verify(mapper).writeValue(outputStream, store);
  inOrder.verify(outputStream).close();
}