@Test
public void testSessionExpiration() throws Exception {

  when(datastore.run(any(KeyQuery.class))).thenReturn(
      new IteratorQueryResults<>(Collections.singletonList(key).iterator()),
      new IteratorQueryResults<>(Arrays.asList(key, attributeKey).iterator())
  );
  store.processExpires();
  verify(datastore).delete(Arrays.asList(key, attributeKey).toArray(new Key[0]));
}