public static byte[] getIncreasingByteArray(int len) {
    return getIncreasingByteArray(0, len);
  }
@Test
  public void getIncreasingByteArray() {
    class TestCase {
      byte[] mExpected;
      int mLength;
      int mStart;

      public TestCase(byte[] expected, int length, int start) {
        mExpected = expected;
        mLength = length;
        mStart = start;
      }
    }

    ArrayList<TestCase> testCases = new ArrayList<>();
    testCases.add(new TestCase(new byte[] {}, 0, 0));
    testCases.add(new TestCase(new byte[] {}, 0, 3));
    testCases.add(new TestCase(new byte[] {0}, 1, 0));
    testCases.add(new TestCase(new byte[] {0, 1, 2}, 3, 0));
    testCases.add(new TestCase(new byte[] {3}, 1, 3));
    testCases.add(new TestCase(new byte[] {3, 4, 5}, 3, 3));

    for (TestCase testCase : testCases) {
      byte[] result = BufferUtils.getIncreasingByteArray(testCase.mStart, testCase.mLength);
      assertEquals(testCase.mExpected.length, result.length);
      for (int k = 0; k < result.length; k++) {
        assertEquals(testCase.mExpected[k], result[k]);
      }
    }
  }