@Test public void testEthereumRLPTests() { Map<String, RLPTestCase> cases = loadRLPTestCases(); cases.forEach((key, aCase) -> { RlpType rlpType = buildRLPType(aCase.getIn()); String message = "Comparing " + key + ": "; String actualRlp = NumericUtil.bytesToHex(RlpEncoder.encode(rlpType)); Assert.assertEquals(message, aCase.getOut(), actualRlp); }); }
public static byte[] encode(RlpType value) { if (value instanceof RlpString) { return encodeString((RlpString) value); } else { return encodeList((RlpList) value); } }
RlpEncoder { public static byte[] encode(RlpType value) { if (value instanceof RlpString) { return encodeString((RlpString) value); } else { return encodeList((RlpList) value); } } }
RlpEncoder { public static byte[] encode(RlpType value) { if (value instanceof RlpString) { return encodeString((RlpString) value); } else { return encodeList((RlpList) value); } }  }
RlpEncoder { public static byte[] encode(RlpType value) { if (value instanceof RlpString) { return encodeString((RlpString) value); } else { return encodeList((RlpList) value); } }  static byte[] encode(RlpType value); }
RlpEncoder { public static byte[] encode(RlpType value) { if (value instanceof RlpString) { return encodeString((RlpString) value); } else { return encodeList((RlpList) value); } }  static byte[] encode(RlpType value);  }