Implemented LUN-54 and added unit tests