Added test functionality.