Add a case class custom shape test case and docs

review by @szeiger