Unit testing component events