JAL-2015 fixed bug in copy constructor and added tests