If extends GenericInput<I> implements InputOutput<I, O>, Operations<Operation> { @Override public If<I, O> shallowClone() throws CloneFailedException { If.Builder<I, O> builder = new If.Builder<I, O>() .input(getInput()) .condition(condition) .conditional(conditional) .then(then) .otherwise(otherwise) .options(options); if (null != conditional) { builder = builder.conditional(conditional.shallowClone()); } if (null != then) { builder = builder.then(then.shallowClone()); } if (null != otherwise) { builder = builder.otherwise(otherwise.shallowClone()); } return builder.build(); }  @Override TypeReference<O> getOutputTypeReference(); @Override If<I, O> shallowClone(); @Override Map<String, String> getOptions(); @Override void setOptions(final Map<String, String> options); @Override @JsonIgnore Collection<Operation> getOperations(); @Override void updateOperations(final Collection<Operation> operations); Boolean getCondition(); void setCondition(final Boolean condition); Operation getThen(); void setThen(final Operation then); Operation getOtherwise(); void setOtherwise(final Operation otherwise); Conditional getConditional(); void setConditional(final Conditional conditional); @Override boolean equals(final Object obj); @Override int hashCode(); @Override String toString();  }
@Test public void testShallowClone() { final Object input = "testInput"; final GetAllElements getAllElements = new GetAllElements(); final If<Object, Object> ifOp = new If.Builder<>() .input(input) .then(getAllElements) .build(); final If<Object, Object> clone = ifOp.shallowClone(); assertNotNull(clone); assertNotSame(clone, ifOp); assertEquals(input, clone.getInput()); }