@@ -65,7 +65,7 @@ public void testCreate() throws Exception {
6565 newNotification .setActive (true );
6666
6767 final Set <Event > events = new HashSet <>();
68- events .add (Event .CREATE_LICENSEE );
68+ events .add (Event .LICENSEE_CREATED );
6969
7070 newNotification .setEvents (events );
7171 newNotification .setProtocol (NotificationProtocol .WEBHOOK );
@@ -89,7 +89,7 @@ public void testCreate() throws Exception {
8989 @ Test
9090 public void testNameIsRequired () throws Exception {
9191 final Notification newNotification = new NotificationImpl ();
92- newNotification .addEvent (Event .CREATE_LICENSEE );
92+ newNotification .addEvent (Event .LICENSEE_CREATED );
9393 newNotification .setProtocol (NotificationProtocol .WEBHOOK );
9494 newNotification .addProperty (Constants .Notification .ENDPOINT , "http://www.test.test" );
9595
@@ -118,7 +118,7 @@ public void testEventsIsRequired() throws Exception {
118118 public void testTypeIsRequired () throws Exception {
119119 final Notification newNotification = new NotificationImpl ();
120120 newNotification .setName ("Notification 1" );
121- newNotification .addEvent (Event .CREATE_LICENSEE );
121+ newNotification .addEvent (Event .LICENSEE_CREATED );
122122 newNotification .addProperty (Constants .Notification .ENDPOINT , "http://www.test.test" );
123123 newNotification .setPayload ("${event}" );
124124
@@ -133,7 +133,7 @@ public void testTypeIsRequired() throws Exception {
133133 public void testEndpointIsRequired () throws Exception {
134134 final Notification newNotification = new NotificationImpl ();
135135 newNotification .setName ("Notification 1" );
136- newNotification .addEvent (Event .CREATE_LICENSEE );
136+ newNotification .addEvent (Event .LICENSEE_CREATED );
137137 newNotification .setProtocol (NotificationProtocol .WEBHOOK );
138138
139139 final Exception e = assertThrows (ServiceException .class , () -> {
@@ -151,8 +151,9 @@ public void testGet() throws Exception {
151151 assertEquals ("Notification 14" , notification .getName ());
152152
153153 final Set <Event > expectedEvents = new HashSet <>();
154- expectedEvents .add (Event .CREATE_LICENSEE );
155- expectedEvents .add (Event .CREATE_LICENSE );
154+ expectedEvents .add (Event .LICENSEE_CREATED );
155+ expectedEvents .add (Event .LICENSE_CREATED );
156+ expectedEvents .add (Event .WARNING_LEVEL_CHANGED );
156157
157158 assertEquals (expectedEvents , notification .getEvents ());
158159 assertEquals (NotificationProtocol .WEBHOOK , notification .getProtocol ());
@@ -170,7 +171,7 @@ public void testList() throws Exception {
170171 assertEquals (3 , notifications .getItemsNumber ());
171172 assertEquals ("N001-TEST" , notifications .getContent ().get (0 ).getNumber ());
172173 assertEquals ("Notification 2" , notifications .getContent ().get (1 ).getName ());
173- assertEquals (Event .CREATE_LICENSEE .name (), notifications .getContent ().get (2 ).getEvents ().stream ().map (Enum ::name ).collect (Collectors .joining ("," )));
174+ assertEquals (Event .LICENSEE_CREATED .name (), notifications .getContent ().get (2 ).getEvents ().stream ().map (Enum ::name ).collect (Collectors .joining ("," )));
174175 }
175176
176177 @ Test
@@ -181,7 +182,7 @@ public void testUpdate() throws Exception {
181182 notification .addProperty (NOTIFICATION_CUSTOM_PROPERTY , "Test Value" );
182183
183184 final Set <Event > events = new HashSet <>();
184- events .add (Event .CREATE_LICENSE );
185+ events .add (Event .LICENSE_CREATED );
185186
186187 notification .setEvents (events );
187188
@@ -191,7 +192,7 @@ public void testUpdate() throws Exception {
191192 assertEquals ("Notification 2" , updatedNotification .getName ());
192193 assertEquals ("N002-TEST" , updatedNotification .getNumber ());
193194 assertEquals (false , updatedNotification .getActive ());
194- assertEquals (Event .CREATE_LICENSE .name (), updatedNotification .getEvents ().stream ().map (Enum ::name ).collect (Collectors .joining ("," )));
195+ assertEquals (Event .LICENSE_CREATED .name (), updatedNotification .getEvents ().stream ().map (Enum ::name ).collect (Collectors .joining ("," )));
195196 }
196197
197198 @ Test
0 commit comments