added unit tests for flash messaging