Added test and documentation for conditional API