COOPR-581: update PR and add unit tests