diff --git a/dubbo-rpc/dubbo-rpc-triple/src/test/java/org/apache/dubbo/rpc/protocol/tri/Http2ProtocolDetectorTest.java b/dubbo-rpc/dubbo-rpc-triple/src/test/java/org/apache/dubbo/rpc/protocol/tri/Http2ProtocolDetectorTest.java index 6384afdd85fa..313396fc47fa 100644 --- a/dubbo-rpc/dubbo-rpc-triple/src/test/java/org/apache/dubbo/rpc/protocol/tri/Http2ProtocolDetectorTest.java +++ b/dubbo-rpc/dubbo-rpc-triple/src/test/java/org/apache/dubbo/rpc/protocol/tri/Http2ProtocolDetectorTest.java @@ -42,16 +42,16 @@ void testDetect() { ByteBuf byteBuf = ByteBufAllocator.DEFAULT.buffer(); ChannelBuffer in = new ByteBufferBackedChannelBuffer(byteBuf.nioBuffer()); ProtocolDetector.Result result = detector.detect(in); - Assertions.assertEquals(result, ProtocolDetector.Result.unrecognized()); + Assertions.assertEquals(result.flag(), ProtocolDetector.Result.unrecognized().flag()); byteBuf.writeBytes(connectionPrefaceBuf); result = detector.detect(new ByteBufferBackedChannelBuffer(byteBuf.nioBuffer())); - Assertions.assertEquals(result, ProtocolDetector.Result.recognized()); + Assertions.assertEquals(result.flag(), ProtocolDetector.Result.recognized().flag()); byteBuf.clear(); byteBuf.writeBytes(connectionPrefaceBuf, 0, 1); result = detector.detect(new ByteBufferBackedChannelBuffer(byteBuf.nioBuffer())); - Assertions.assertEquals(result, ProtocolDetector.Result.needMoreData()); + Assertions.assertEquals(result.flag(), ProtocolDetector.Result.needMoreData().flag()); } }