FactMapping { public FactMapping cloneFactMapping() { return new FactMapping(this); } FactMapping();  FactMapping(FactIdentifier factIdentifier, ExpressionIdentifier expressionIdentifier);  FactMapping(String factAlias, FactIdentifier factIdentifier, ExpressionIdentifier expressionIdentifier); private  FactMapping(FactMapping original); String getFullExpression(); List<ExpressionElement> getExpressionElementsWithoutClass(); List<ExpressionElement> getExpressionElements(); void addExpressionElement(String stepName, String className); String getClassName(); ExpressionIdentifier getExpressionIdentifier(); FactIdentifier getFactIdentifier(); String getFactAlias(); void setFactAlias(String factAlias); String getExpressionAlias(); void setExpressionAlias(String expressionAlias); List<String> getGenericTypes(); void setGenericTypes(List<String> genericTypes); FactMapping cloneFactMapping(); static String getPlaceHolder(FactMappingType factMappingType); static String getPlaceHolder(FactMappingType factMappingType, int index); FactMappingValueType getFactMappingValueType(); void setFactMappingValueType(FactMappingValueType factMappingValueType); static String getInstancePlaceHolder(int index); static String getPropertyPlaceHolder(int index); @Override boolean equals(Object o); @Override int hashCode(); Double getColumnWidth(); void setColumnWidth(Double columnWidth);  }
@Test public void cloneFactMapping() { FactMapping original = new FactMapping("FACT_ALIAS", new FactIdentifier("FI_TEST", "com.test.Foo"), new ExpressionIdentifier("EI_TEST", FactMappingType.GIVEN)); original.addExpressionElement("FIRST_STEP", String.class.getName()); original.setExpressionAlias("EA_TEST"); original.setGenericTypes(new ArrayList<>()); FactMapping retrieved = original.cloneFactMapping(); assertTrue(retrieved.equals(original)); }