Re #1152 Adding test and documentation.