@saleem: added tests to show how to TDD your code when you depend on third-party code with unpredictable static methods (using PowerMockitor)