### Question:
WasmEventEncoder { public static String encodeIndexParameter(Object o) { if (o instanceof Int) { return encodeInt((Int)o); } else if(o instanceof Uint){ return encodeUint((Uint) o); } else if(o instanceof WasmAddress){ return encodeAddress((WasmAddress) o); } else if(o instanceof Boolean){ return encodeBoolean((Boolean) o); } else if(o instanceof String){ return encodeString((String) o); } else if(o instanceof List){ return encodeList((List<?>) o); } else if(o instanceof byte[]){ return encodeBytes((byte[]) o); } else if(o.getClass().isArray()){ return encodeArray((Object[]) o); } else { return encodeBytes(RLPCodec.encode(o)); } } private  WasmEventEncoder(); static String encode(WasmEvent event); static String encodeIndexParameter(Object o);  }### Answer:
@Test public void encodeNumber() { BigInteger number = BigInteger.valueOf(246567L); String result = WasmEventEncoder.encodeIndexParameter(Uint128.of(number)); assertThat(result, is("0x000000000000000000000000000000000000000000000000000000000003c327")); number = BigInteger.valueOf(-246567L); result = WasmEventEncoder.encodeIndexParameter(Int128.of(number)); assertThat(result, is("0x000000000000000000000000000000000000000000000000000000000007864d")); }
@Test public void encodeIntUint8List() { List<Uint8> uintList = Arrays.asList(Uint8.of(240), Uint8.of(12)); String result = WasmEventEncoder.encodeIndexParameter(uintList); assertThat(result, is("0x000000000000000000000000000000000000000000000000000000000000f00c")); List<Int8> intList = Arrays.asList(Int8.of(120), Int8.of(-12)); result = WasmEventEncoder.encodeIndexParameter(intList); assertThat(result, is("0x00000000000000000000000000000000000000000000000000000000000078f4")); }