/** * Creates a precanned {@link DefaultValueTrait} using the idempotency token generation which * creates a new UUID if a field is null. This is used when the 'idempotencyToken' trait in the service * model is present. * * @return New trait instance. */ public static DefaultValueTrait idempotencyToken() { return new DefaultValueTrait(IdempotentUtils.getGenerator()); } }
public ProtocolTestRunner(String intermediateModelLocation) { WireMockUtils.startWireMockServer(); IntermediateModel model = loadModel(intermediateModelLocation); this.clientReflector = new ClientReflector(model); this.marshallingTestRunner = new MarshallingTestRunner(model, clientReflector); this.unmarshallingTestRunner = new UnmarshallingTestRunner(model, clientReflector); IdempotentUtils.setGenerator(() -> "00000000-0000-4000-8000-000000000000"); }
public ProtocolTestRunner(String intermediateModelLocation) { WireMockUtils.startWireMockServer(); final IntermediateModel model = loadModel(intermediateModelLocation); this.clientReflector = new ClientReflector(model); this.marshallingTestRunner = new MarshallingTestRunner(model, clientReflector); this.unmarshallingTestRunner = new UnmarshallingTestRunner(model, clientReflector); IdempotentUtils.setGenerator(() -> "00000000-0000-4000-8000-000000000000"); }