add unit test

add unit test to check DuplicateEventSettingError is thrown
appropriately.