@@ -0,0 +1,2689 @@
+package com.fasterxml.jackson.failing;%0A%0Aimport java.util.Objects;%0A%0Aimport com.fasterxml.jackson.annotation.*;%0A%0Aimport com.fasterxml.jackson.databind.*;%0Aimport com.fasterxml.jackson.databind.exc.ValueInstantiationException;%0A%0Apublic class MergeWithCreator1921Test extends BaseMapTest%0A%7B%0A    static class Account %7B%0A        @JsonMerge(value = OptBoolean.TRUE)%0A        private final Validity validity;%0A%0A        @JsonCreator%0A        public Account(@JsonProperty(value = %22validity%22, required = true) Validity validity) %7B%0A            this.validity = validity;%0A        %7D%0A%0A        public Validity getValidity() %7B%0A            return validity;%0A        %7D%0A    %7D%0A%0A    static class Validity %7B%0A        public static final String VALID_FROM_CANT_BE_NULL = %22Valid from can't be null%22;%0A        public static final String VALID_TO_CANT_BE_BEFORE_VALID_FROM = %22Valid to can't be before valid from%22;%0A%0A        private final String _validFrom;%0A        private final String _validTo;%0A%0A        @JsonCreator%0A        public Validity(@JsonProperty(value = %22validFrom%22, required = true) String validFrom,%0A                        @JsonProperty(%22validTo%22) String validTo) %7B%0A            checkValidity(validFrom, validTo);%0A%0A            this._validFrom = validFrom;%0A            this._validTo = validTo;%0A        %7D%0A%0A        private void checkValidity(String from, String to) %7B%0A            Objects.requireNonNull(from, VALID_FROM_CANT_BE_NULL);%0A            if (to != null) %7B%0A                if (from.compareTo(to) %3E 0) %7B%0A                    throw new IllegalStateException(VALID_TO_CANT_BE_BEFORE_VALID_FROM);%0A                %7D%0A            %7D%0A        %7D%0A%0A        public String getValidFrom() %7B%0A            return _validFrom;%0A        %7D%0A%0A        public String getValidTo() %7B%0A            return _validTo;%0A        %7D%0A    %7D%0A%0A    public void testMergeWithCreator() throws Exception%0A    %7B%0A        final String JSON = %22%7B %5C%22validity%5C%22: %7B %5C%22validFrom%5C%22: %5C%222018-02-01%5C%22, %5C%22validTo%5C%22: %5C%222018-01-31%5C%22 %7D %7D%22;%0A%0A        final ObjectMapper mapper = newJsonMapper();%0A%0A        try %7B%0A            mapper.readValue(JSON, Account.class);%0A            fail(%22Should not pass%22);%0A        %7D catch (ValueInstantiationException e) %7B%0A            verifyException(e, %22Cannot construct%22);%0A            verifyException(e, Validity.VALID_TO_CANT_BE_BEFORE_VALID_FROM);%0A        %7D%0A%0A        try %7B%0A            Account acc = new Account(new Validity(%22abc%22, %22def%22));%0A            mapper.readerForUpdating(acc)%0A                .readValue(JSON);%0A            fail(%22Should not pass%22);%0A        %7D catch (ValueInstantiationException e) %7B%0A            verifyException(e, %22Cannot construct%22);%0A            verifyException(e, Validity.VALID_TO_CANT_BE_BEFORE_VALID_FROM);%0A        %7D%0A    %7D%0A%7D%0A

Add failing test for #1921