public Iterable<TimestampedValue<T>> read() {
    checkState(
        !isClosed,
        "OrderedList user state is no longer usable because it is closed for %s",
        requestTemplate.getStateKey());

    return readRange(Instant.ofEpochMilli(Long.MIN_VALUE), Instant.ofEpochMilli(Long.MAX_VALUE));
  }
@Test
  public void testRead() throws Exception {
    FakeBeamFnStateClient fakeClient =
        new FakeBeamFnStateClient(
            timestampedValueCoder,
            ImmutableMap.of(createOrderedListStateKey("A", 1), asList(A1, B1)));
    OrderedListUserState<String> userState =
        new OrderedListUserState<>(
            Caches.noop(),
            fakeClient,
            "instructionId",
            createOrderedListStateKey("A"),
            StringUtf8Coder.of());

    assertArrayEquals(
        asList(A1, B1).toArray(), Iterables.toArray(userState.read(), TimestampedValue.class));
    userState.asyncClose();
    assertThrows(IllegalStateException.class, () -> userState.read());
  }