@Test @DisplayName("create 'reject with ThrowableMessage' `Ack` instance") void rejectWithThrowableMessage() { TestActorRequestFactory requestFactory = new TestActorRequestFactory(BusFilterTest.class); Command command = requestFactory.generateCommand(); CommandEnvelope origin = CommandEnvelope.of(command); ShareCannotBeTraded rejection = ShareCannotBeTraded .newBuilder() .setShare(ShareId.newBuilder() .setValue(newUuid()) .build()) .setReason("Ack factory test.") .build(); RejectionEnvelope rejectionEnvelope = RejectionEnvelope.from(origin, rejection); Ack ack = Acks.reject(ID, rejectionEnvelope); assertIdEquals(ack); assertStatusCase(ack, REJECTION); }
public static Ack reject(Message id, Error cause) { checkNotDefaultArg(id); checkNotDefaultArg(cause); Status status = Status .newBuilder() .setError(cause) .build(); return setStatus(id, status); }
Acks { public static Ack reject(Message id, Error cause) { checkNotDefaultArg(id); checkNotDefaultArg(cause); Status status = Status .newBuilder() .setError(cause) .build(); return setStatus(id, status); } }
Acks { public static Ack reject(Message id, Error cause) { checkNotDefaultArg(id); checkNotDefaultArg(cause); Status status = Status .newBuilder() .setError(cause) .build(); return setStatus(id, status); } private  Acks(); }
Acks { public static Ack reject(Message id, Error cause) { checkNotDefaultArg(id); checkNotDefaultArg(cause); Status status = Status .newBuilder() .setError(cause) .build(); return setStatus(id, status); } private  Acks(); static Ack acknowledge(Message id); static Ack reject(Message id, Error cause); static Ack reject(Message id, RejectionEnvelope cause); }
Acks { public static Ack reject(Message id, Error cause) { checkNotDefaultArg(id); checkNotDefaultArg(cause); Status status = Status .newBuilder() .setError(cause) .build(); return setStatus(id, status); } private  Acks(); static Ack acknowledge(Message id); static Ack reject(Message id, Error cause); static Ack reject(Message id, RejectionEnvelope cause);  }