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