public final class AddRoles extends UpdateActionImpl<State>
See also StateUpdateCommand.
withUpdateableState(client(), builder -> builder.type(StateType.REVIEW_STATE), state -> { final Set<StateRole> roles = asSet(REVIEW_INCLUDED_IN_STATISTICS); final StateUpdateCommand command = StateUpdateCommand.of(state, AddRoles.of(roles)); final State updatedState = client().executeBlocking(command); assertThat(updatedState.getRoles()).isEqualTo(roles); return updatedState; });
See the test code.
State.getRoles()
Modifier and Type | Method and Description |
---|---|
Set<StateRole> |
getRoles() |
static AddRoles |
of(Set<StateRole> roles) |
getAction