Added test for signal event generation.
Fixed test code and model code to pass all tests.