# Unit Test for event-listener

**URL:** <https://forum.keycloak.org/t/unit-test-for-event-listener/19356>\
**Category:** Extending the server\
**Tags:** testing\
**Created:** [January 2, 2023, 10:16am UTC](https://forum.keycloak.org/t/unit-test-for-event-listener/19356 "2023-01-02T10:16:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nesly](https://avatars.discourse-cdn.com/v4/letter/n/57b2e6/32.png) [@Nesly](https://forum.keycloak.org/u/Nesly)\
**Post date:** [January 2, 2023, 10:16am UTC](https://forum.keycloak.org/t/unit-test-for-event-listener/19356/1 "2023-01-02T10:16:56Z")

</div>

```auto
@Override
public void onEvent(AdminEvent event, boolean includeRepresentation) {
   log.info("Admin Event Occurred:" + toString(event));}`

```

I want to add test for the following method. How could I implement verify test for this method
