public ApprovalRequest applyTemplate(final ApprovalRequest template) {
        if (template == null) {
            return this;
        }

        final ApprovalRequest withTemplateValues = new ApprovalRequest();

        for (final Field field : FieldHolder.INSTANCE.fields) {
            try {
                final Object currentValue = field.get(this);

                // if a field has not been set, and the template has it set use
                // the template value
                if (currentValue == null) {
                    final Object templateValue = field.get(template);

                    if (templateValue != null) {
                        field.set(withTemplateValues, templateValue);
                    }
                } else {
                    field.set(withTemplateValues, currentValue);
                }
            } catch (IllegalArgumentException | IllegalAccessException e) {
                throw new IllegalStateException("Unable to apply values from template", e);
            }
        }

        return withTemplateValues;
    }
@Test
    public void shouldTolerateNullTemplates() {
        final ApprovalRequest request = new ApprovalRequest();

        final ApprovalRequest appliedTo = request.applyTemplate(null);

        assertThat("For null templates applyTemplate should return same object", appliedTo, sameInstance(request));
    }