PaginatedTrait extends AbstractTrait implements ToSmithyBuilder<PaginatedTrait> { public Optional<String> getOutputToken() { return Optional.ofNullable(outputToken); } private  PaginatedTrait(Builder builder); Optional<String> getItems(); Optional<String> getInputToken(); Optional<String> getOutputToken(); Optional<String> getPageSize(); static Optional<MemberShape> resolvePath(
            String path,
            Model model,
            StructureShape shape
    ); PaginatedTrait merge(PaginatedTrait other); @Override Builder toBuilder(); static Builder builder(); static final ShapeId ID; }
@Test public void allowsNestedOutputToken() { TraitFactory provider = TraitFactory.createServiceFactory(); Node node = Node.objectNode() .withMember("inputToken", Node.from("inputToken")) .withMember("outputToken", Node.from("result.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.getOutputToken(), equalTo(Optional.of("result.outputToken"))); }