writer and unit test for KPEvent