Method "findMeteringPointByIdAndValidity" uses agreements "validFrom" value, while trying to find the MP. If this "validFrom" is in the past, then MP cannot be found and error is thrown and agreement cannot be added.
Steps
Create new MP
Add new GRID agreement, where validFrom is in the past (doesn't matter how much)
Expected result - agreement is added, because MP-s validity doesn't affect agreements creation or modification
Actual result - system throws "mpm.error.business.not-exists.metering-point" error
Summary
Method "findMeteringPointByIdAndValidity" uses agreements "validFrom" value, while trying to find the MP. If this "validFrom" is in the past, then MP cannot be found and error is thrown and agreement cannot be added.
Steps