use of com.alibaba.nacos.consistency.entity.GetRequest in project nacos by alibaba.
the class ProtoMessageUtilTest method testConvertToReadRequest.
@Test
public void testConvertToReadRequest() {
ByteString data = ByteString.copyFrom("data".getBytes());
String group = "test";
GetRequest getRequest = GetRequest.newBuilder().setGroup(group).setData(data).putExtendInfo("k", "v").build();
ReadRequest readRequest = ProtoMessageUtil.convertToReadRequest(getRequest);
assertEquals(group, readRequest.getGroup());
assertEquals(data, readRequest.getData());
assertEquals(1, readRequest.getExtendInfoCount());
}
Aggregations