ClearKeyUtil { public static byte[] adjustRequestData(byte[] request) { if (Util.SDK_INT >= 27) { return request; } String requestString = Util.fromUtf8Bytes(request); return Util.getUtf8Bytes(base64ToBase64Url(requestString)); } private  ClearKeyUtil(); static byte[] adjustRequestData(byte[] request); static byte[] adjustResponseData(byte[] response);  }
@Config(sdk = 26) @Test public void testAdjustRequestDataV26() { byte[] expected = Util.getUtf8Bytes( "{" + "\"kids\":[" + "\"abc-def_\"," + "\"ab-cde_f\"" + "]," + "\"type\":\"temporary\"" + "}"); assertThat(ClearKeyUtil.adjustRequestData(KEY_REQUEST)).isEqualTo(expected); }
@Config(sdk = 27) @Test public void testAdjustRequestDataV27() { assertThat(ClearKeyUtil.adjustRequestData(KEY_REQUEST)).isEqualTo(KEY_REQUEST); }