### Question:
ExampleUserDefinedFunctionHandler extends UserDefinedFunctionHandler { public Integer multiply(Integer factor1, Integer factor2) { return factor1 * factor2; } ExampleUserDefinedFunctionHandler(); Integer multiply(Integer factor1, Integer factor2); String concatenate(List<String> list); String to_json(Map<String, Object> struct); Long get_default_value_if_null(Long value);  }### Answer:
@Test public void testMultiplyMethod() throws Exception { Schema inputSchema = SchemaBuilder.newBuilder() .addField("factor1", Types.MinorType.INT.getType()) .addField("factor2", Types.MinorType.INT.getType()) .build(); Schema outputSchema = SchemaBuilder.newBuilder() .addField("product", Types.MinorType.INT.getType()) .build(); Block inputRecords = allocator.createBlock(inputSchema); inputRecords.setRowCount(1); IntVector inputVector1 = (IntVector) inputRecords.getFieldVector("factor1"); IntVector inputVector2 = (IntVector) inputRecords.getFieldVector("factor2"); inputVector1.setSafe(0, 2); inputVector2.setSafe(0, 3); UserDefinedFunctionResponse response = runAndAssertSerialization(inputRecords, outputSchema, "multiply"); Block outputRecords = response.getRecords(); assertEquals(1, outputRecords.getRowCount()); FieldReader fieldReader = outputRecords.getFieldReader("product"); ArrowValueProjector arrowValueProjector = ProjectorUtils.createArrowValueProjector(fieldReader); assertEquals(exampleUserDefinedFunctionHandler.multiply(2, 3), arrowValueProjector.project(0)); }