Search in sources :

Example 1 with VisibilityConstraint

use of org.apache.accumulo.core.constraints.VisibilityConstraint in project accumulo by apache.

the class VisibilityConstraintTest method setUp.

@Before
public void setUp() throws Exception {
    vc = new VisibilityConstraint();
    mutation = new Mutation("r");
    ArrayByteSequence bs = new ArrayByteSequence("good".getBytes(UTF_8));
    AuthorizationContainer ac = createNiceMock(AuthorizationContainer.class);
    expect(ac.contains(bs)).andReturn(true);
    replay(ac);
    env = createMock(Environment.class);
    expect(env.getAuthorizationsContainer()).andReturn(ac);
    replay(env);
}
Also used : VisibilityConstraint(org.apache.accumulo.core.constraints.VisibilityConstraint) Environment(org.apache.accumulo.core.constraints.Constraint.Environment) Mutation(org.apache.accumulo.core.data.Mutation) ArrayByteSequence(org.apache.accumulo.core.data.ArrayByteSequence) Before(org.junit.Before)

Aggregations

Environment (org.apache.accumulo.core.constraints.Constraint.Environment)1 VisibilityConstraint (org.apache.accumulo.core.constraints.VisibilityConstraint)1 ArrayByteSequence (org.apache.accumulo.core.data.ArrayByteSequence)1 Mutation (org.apache.accumulo.core.data.Mutation)1 Before (org.junit.Before)1