SONATA-294 - Minor fix and added unit tests