adding tests from documentation examples