@Test
  public void testRawModeWithInvalidCombinations() throws Exception {
    // Test that using rawMode and range together fails.
    GetBlobOptionsBuilder options = new GetBlobOptionsBuilder().operationType(GetBlobOptions.OperationType.All)
        .range(ByteRanges.fromOffsetRange(0, 1))
        .rawMode(true);
    TestUtils.assertException(IllegalArgumentException.class, () -> options.build(), null);

    // Test that using rawMode fails with OperationType other than ALL.
    options.range(null);
    options.operationType(GetBlobOptions.OperationType.BlobInfo);
    TestUtils.assertException(IllegalArgumentException.class, () -> options.build(), null);
    options.operationType(GetBlobOptions.OperationType.Data);
    TestUtils.assertException(IllegalArgumentException.class, () -> options.build(), null);
  }
Test rawMode with invalid combinations.
@throws Exception
ambry-api/src/test/java/com/github/ambry/router/GetBlobOptionsTest.java