Tests for /notification_metadata plus some bug fixes.