    @Test
    public void getEndRowKeyOfPrefix() {

        try {
            RowKeyUtil.getEndRowKeyOfPrefix(null);
            Assert.fail();
        } catch (Exception e) {
            //ignore.
        }

        try {
            RowKeyUtil.getEndRowKeyOfPrefix(new StringRowKey(""));
            Assert.fail();
        } catch (Exception e) {
            //ignore.
        }

        try {
            RowKeyUtil.getEndRowKeyOfPrefix(new BytesRowKey(new HexBytes("FF")
                    .getData()));
            Assert.fail();
        } catch (Exception e) {
            //ignore.
        }

        try {
            RowKeyUtil.getEndRowKeyOfPrefix(new BytesRowKey(new HexBytes(
                    "FF FF").getData()));
            Assert.fail();
        } catch (Exception e) {
            //ignore.
        }

        RowKey endRowKey = RowKeyUtil.getEndRowKeyOfPrefix(new BytesRowKey(
                new HexBytes("FF AB ").getData()));
        Assert.assertEquals("FF AC ",
                EncodingUtil.toHexString(endRowKey.toBytes()));
    }