### Question:
FunctionEncoder { public static String encodeConstructor(List<Type> parameters) { return encodeParameters(parameters, new StringBuilder()); } private  FunctionEncoder(); static String encode(Function function); static String encodeConstructor(List<Type> parameters); static String buildMethodId(String methodSignature);  }### Answer:
@Test public void testEncodeConstructorEmpty() { assertThat(FunctionEncoder.encodeConstructor(Collections.emptyList()), is("")); }
@Test public void testEncodeConstructorString() { assertThat(FunctionEncoder.encodeConstructor( Collections.singletonList(new Utf8String("Greetings!"))), is("0000000000000000000000000000000000000000000000000000000000000020" + "000000000000000000000000000000000000000000000000000000000000000a" + "4772656574696e67732100000000000000000000000000000000000000000000")); }
@Test public void testEncodeConstructorUint() { assertThat(FunctionEncoder.encodeConstructor( Arrays.asList(new Uint(BigInteger.ONE), new Uint(BigInteger.valueOf(0x20)))), is("0000000000000000000000000000000000000000000000000000000000000001" + "0000000000000000000000000000000000000000000000000000000000000020")); }