Added test and registration code