FunctionImpl implements Function { private FunctionImpl(Builder builder) { this.name = builder.name; this.namespace = builder.namespace; this.bound = builder.bound; this.composable = builder.composable; this.entitySetPath = builder.entitySetPath; this.returnType = builder.returnType; this.parameters = builder.parameters; this.javaClass = builder.javaClass; } private  FunctionImpl(Builder builder); @Override String getName(); @Override boolean isBound(); @Override boolean isComposable(); @Override String getEntitySetPath(); @Override String getReturnType(); @Override Set<Parameter> getParameters(); @Override String getNamespace(); @Override Class<?> getJavaClass();  }
@Test public void testFunctionImpl() { FunctionImpl function = new FunctionImpl.Builder() .setBound(true) .setComposable(true) .setEntitySetPath("MyEntitySetPath") .setJavaClass(FunctionSample.class) .setName("MyFunctionName") .setNamespace("MyFunctionNamespace") .setParameters(new HashSet<>()) .setReturnType("MyFunctionReturnType") .build(); assertTrue(function.isBound()); assertTrue(function.isComposable()); assertEquals("MyEntitySetPath", function.getEntitySetPath()); assertEquals(function.getJavaClass(), FunctionSample.class); assertEquals("MyFunctionName", function.getName()); assertEquals("MyFunctionNamespace", function.getNamespace()); assertNotNull(function.getParameters()); assertTrue(function.getParameters().isEmpty()); assertEquals("MyFunctionReturnType", function.getReturnType()); }