Adds test and doc for custom type