Added some tests for spring extension
Fixed issues in pending messages stats