@Test
public void allowsNestedOutputItems() {

    TraitFactory provider = TraitFactory.createServiceFactory();
    Node node = Node.objectNode()
            .withMember("items", Node.from("result.items"))
            .withMember("inputToken", Node.from("inputToken"))
            .withMember("outputToken", Node.from("outputToken"));
    Optional<Trait> trait = provider.createTrait(
            ShapeId.from("smithy.api#paginated"), ShapeId.from("ns.qux#foo"), node);
    assertThat(trait.isPresent(), is(true));
    assertThat(trait.get(), instanceOf(PaginatedTrait.class));
    PaginatedTrait paginatedTrait = (PaginatedTrait) trait.get();
    assertThat(paginatedTrait.getItems(), equalTo(Optional.of("result.items")));
}