@Test
public void testPopValues() {

  OpenedValueStore<BigInteger, BigInteger> store = new OpenedValueStoreImpl<>();
  store.pushOpenedValue(authenticated, open);
  store.pushOpenedValue(authenticated, open);
  Pair<List<BigInteger>, List<BigInteger>> both = store.popValues();
  List<BigInteger> first = both.getFirst();
  Assert.assertEquals(2, first.size());
  List<BigInteger> second = both.getSecond();
  Assert.assertEquals(2, second.size());
  Assert.assertEquals(authenticated, first.get(0));
  Assert.assertEquals(authenticated, first.get(1));
  Assert.assertEquals(open, second.get(0));
  Assert.assertEquals(open, second.get(1));
  Assert.assertFalse("Store not expected to have pending values", store.hasPendingValues());
}