Re #7858. Changed if logic and added unit test to UnitCell.
Merge branch 'feature/7846_print_lattice' into develop