DDMExpressionFactoryImpl implements DDMExpressionFactory { @Override public <T> DDMExpression<T> createExpression( CreateExpressionRequest createExpressionRequest) throws DDMExpressionException { DDMExpressionImpl<T> ddmExpressionImpl = new DDMExpressionImpl<>( createExpressionRequest.getExpression()); ddmExpressionImpl.setDDMExpressionActionHandler( createExpressionRequest.getDDMExpressionActionHandler()); ddmExpressionImpl.setDDMExpressionFieldAccessor( createExpressionRequest.getDDMExpressionFieldAccessor()); ddmExpressionImpl.setDDMExpressionObserver( createExpressionRequest.getDDMExpressionObserver()); ddmExpressionImpl.setDDMExpressionParameterAccessor( createExpressionRequest.getDDMExpressionParameterAccessor()); ddmExpressionImpl.setDDMExpressionFunctionTracker( ddmExpressionFunctionTracker); return ddmExpressionImpl; }  @Override DDMExpression<T> createExpression(
			CreateExpressionRequest createExpressionRequest);  }
@Test public void testCreateDDMExpression() throws Exception { DDMExpressionFactoryImpl ddmExpressionFactoryImpl = new DDMExpressionFactoryImpl(); ddmExpressionFactoryImpl.ddmExpressionFunctionTracker = _ddmExpressionFunctionTracker; when( _ddmExpressionFunctionTracker.getDDMExpressionFunctionFactories( Matchers.any()) ).thenReturn( HashMapBuilder.<String, DDMExpressionFunctionFactory>put( "pow", () -> new PowFunction() ).build() ); CreateExpressionRequest.Builder builder = CreateExpressionRequest.Builder.newBuilder("pow(2,3)"); DDMExpression<BigDecimal> ddmExpression = ddmExpressionFactoryImpl.createExpression(builder.build()); BigDecimal actual = ddmExpression.evaluate(); Assert.assertEquals(0, actual.compareTo(new BigDecimal(8))); }