ClientDiscoveredEndpointTrait extends AbstractTrait implements ToSmithyBuilder<ClientDiscoveredEndpointTrait> { public boolean isRequired() { return required; } private  ClientDiscoveredEndpointTrait(Builder builder); static Builder builder(); boolean isRequired(); @Override SmithyBuilder<ClientDiscoveredEndpointTrait> toBuilder(); static final ShapeId ID; }
@Test public void loadsFromModel() { Model result = Model.assembler() .discoverModels(getClass().getClassLoader()) .addImport(getClass().getResource("test-model.json")) .assemble() .unwrap(); OperationShape operation = result .expectShape(ShapeId.from("ns.foo#GetObject")) .asOperationShape().get(); ClientDiscoveredEndpointTrait trait = operation.getTrait(ClientDiscoveredEndpointTrait.class).get(); assertTrue(trait.isRequired()); }