3434
3535import org .apache .accumulo .core .data .ConstraintViolationSummary ;
3636import org .apache .accumulo .core .data .Mutation ;
37+ import org .apache .accumulo .core .data .TableId ;
3738import org .apache .accumulo .core .data .TabletId ;
3839import org .apache .accumulo .core .data .constraints .Constraint ;
3940import org .apache .accumulo .core .data .constraints .Constraint .Environment ;
40- import org .apache .hadoop .io .Text ;
4141import org .junit .jupiter .api .BeforeEach ;
4242import org .junit .jupiter .api .Test ;
4343
@@ -46,7 +46,6 @@ public class ConstraintCheckerTest {
4646 private ConstraintChecker cc ;
4747 private ArrayList <Constraint > constraints ;
4848 private Environment env ;
49- private TabletId tabletId ;
5049 private Mutation m ;
5150 private Mutation m2 ;
5251
@@ -57,13 +56,11 @@ public void setup() throws SecurityException {
5756 expect (cc .getConstraints ()).andReturn (constraints );
5857
5958 env = createMock (Environment .class );
60- tabletId = createMock ( TabletId .class );
59+ TabletId tabletId = TabletId .of ( TableId . of ( "id" ), "d" , "a" );
6160 expect (env .getTablet ()).andReturn (tabletId );
6261
6362 m = createMock (Mutation .class );
6463 m2 = createMock (Mutation .class );
65- expect (tabletId .getEndRow ()).andReturn (new Text ("d" )).anyTimes ();
66- expect (tabletId .getPrevEndRow ()).andReturn (new Text ("a" )).anyTimes ();
6764 expect (m .getRow ()).andReturn ("b" .getBytes (UTF_8 )).anyTimes ();
6865 expect (m2 .getRow ()).andReturn ("z" .getBytes (UTF_8 )).anyTimes ();
6966 }
@@ -88,7 +85,6 @@ private Constraint makeFailureConstraint() {
8885 }
8986
9087 private void replayAll () {
91- replay (tabletId );
9288 replay (env );
9389 replay (cc );
9490 replay (m );
0 commit comments