ProtoUtils { public static Schema requestSchema(int apiKey, int version) { return schemaFor(Protocol.REQUESTS, apiKey, version); }  static short latestVersion(int apiKey); static Schema requestSchema(int apiKey, int version); static Schema currentRequestSchema(int apiKey); static Schema responseSchema(int apiKey, int version); static Schema currentResponseSchema(int apiKey); static Struct parseRequest(int apiKey, int version, ByteBuffer buffer); static Struct parseResponse(int apiKey, ByteBuffer buffer); static Struct parseResponse(int apiKey, int version, ByteBuffer buffer);  }
@Test(expected = IllegalArgumentException.class) public void schemaVersionOutOfRange() { ProtoUtils.requestSchema(ApiKeys.PRODUCE.id, Protocol.REQUESTS[ApiKeys.PRODUCE.id].length); }