@@ -45,18 +45,18 @@ public void beforeEach() throws IOException {
4545
4646 @ Test
4747 public void testSyncSuccess () throws IOException , PubNubException {
48- List <Object > testArray = new ArrayList <Object >();
49- List <Object > historyItems = new ArrayList <Object >();
48+ List <Object > testArray = new ArrayList <>();
49+ List <Object > historyItems = new ArrayList <>();
5050
51- Map <String , Object > historyEnvelope1 = new HashMap <String , Object >();
52- Map <String , Object > historyItem1 = new HashMap <String , Object >();
51+ Map <String , Object > historyEnvelope1 = new HashMap <>();
52+ Map <String , Object > historyItem1 = new HashMap <>();
5353 historyItem1 .put ("a" , 11 );
5454 historyItem1 .put ("b" , 22 );
5555 historyEnvelope1 .put ("timetoken" , 1111 );
5656 historyEnvelope1 .put ("message" , historyItem1 );
5757
58- Map <String , Object > historyEnvelope2 = new HashMap <String , Object >();
59- Map <String , Object > historyItem2 = new HashMap <String , Object >();
58+ Map <String , Object > historyEnvelope2 = new HashMap <>();
59+ Map <String , Object > historyItem2 = new HashMap <>();
6060 historyItem2 .put ("a" , 33 );
6161 historyItem2 .put ("b" , 44 );
6262 historyEnvelope2 .put ("timetoken" , 2222 );
@@ -93,18 +93,18 @@ public void testSyncAuthSuccess() throws PubNubException {
9393
9494 pubnub .getConfiguration ().setAuthKey ("authKey" );
9595
96- List <Object > testArray = new ArrayList <Object >();
97- List <Object > historyItems = new ArrayList <Object >();
96+ List <Object > testArray = new ArrayList <>();
97+ List <Object > historyItems = new ArrayList <>();
9898
99- Map <String , Object > historyEnvelope1 = new HashMap <String , Object >();
100- Map <String , Object > historyItem1 = new HashMap <String , Object >();
99+ Map <String , Object > historyEnvelope1 = new HashMap <>();
100+ Map <String , Object > historyItem1 = new HashMap <>();
101101 historyItem1 .put ("a" , 11 );
102102 historyItem1 .put ("b" , 22 );
103103 historyEnvelope1 .put ("timetoken" , 1111 );
104104 historyEnvelope1 .put ("message" , historyItem1 );
105105
106- Map <String , Object > historyEnvelope2 = new HashMap <String , Object >();
107- Map <String , Object > historyItem2 = new HashMap <String , Object >();
106+ Map <String , Object > historyEnvelope2 = new HashMap <>();
107+ Map <String , Object > historyItem2 = new HashMap <>();
108108 historyItem2 .put ("a" , 33 );
109109 historyItem2 .put ("b" , 44 );
110110 historyEnvelope2 .put ("timetoken" , 2222 );
@@ -178,8 +178,8 @@ public void testSyncEncryptedWithPNOtherSuccess() throws PubNubException {
178178
179179 @ Test
180180 public void testSyncSuccessWithoutTimeToken () throws PubNubException {
181- List <Object > testArray = new ArrayList <Object >();
182- List <Object > historyItems = new ArrayList <Object >();
181+ List <Object > testArray = new ArrayList <>();
182+ List <Object > historyItems = new ArrayList <>();
183183
184184 Map <String , Object > historyItem1 = new HashMap <>();
185185 historyItem1 .put ("a" , 11 );
@@ -218,18 +218,18 @@ public void testSyncSuccessWithoutTimeToken() throws PubNubException {
218218
219219 @ Test (expected =PubNubException .class )
220220 public void testMissinChannel () throws IOException , PubNubException {
221- List <Object > testArray = new ArrayList <Object >();
222- List <Object > historyItems = new ArrayList <Object >();
221+ List <Object > testArray = new ArrayList <>();
222+ List <Object > historyItems = new ArrayList <>();
223223
224- Map <String , Object > historyEnvelope1 = new HashMap <String , Object >();
225- Map <String , Object > historyItem1 = new HashMap <String , Object >();
224+ Map <String , Object > historyEnvelope1 = new HashMap <>();
225+ Map <String , Object > historyItem1 = new HashMap <>();
226226 historyItem1 .put ("a" , 11 );
227227 historyItem1 .put ("b" , 22 );
228228 historyEnvelope1 .put ("timetoken" , 1111 );
229229 historyEnvelope1 .put ("message" , historyItem1 );
230230
231- Map <String , Object > historyEnvelope2 = new HashMap <String , Object >();
232- Map <String , Object > historyItem2 = new HashMap <String , Object >();
231+ Map <String , Object > historyEnvelope2 = new HashMap <>();
232+ Map <String , Object > historyItem2 = new HashMap <>();
233233 historyItem2 .put ("a" , 33 );
234234 historyItem2 .put ("b" , 44 );
235235 historyEnvelope2 .put ("timetoken" , 2222 );
@@ -250,18 +250,18 @@ public void testMissinChannel() throws IOException, PubNubException {
250250
251251 @ Test (expected =PubNubException .class )
252252 public void testChannelIsEmpty () throws PubNubException {
253- List <Object > testArray = new ArrayList <Object >();
254- List <Object > historyItems = new ArrayList <Object >();
253+ List <Object > testArray = new ArrayList <>();
254+ List <Object > historyItems = new ArrayList <>();
255255
256- Map <String , Object > historyEnvelope1 = new HashMap <String , Object >();
257- Map <String , Object > historyItem1 = new HashMap <String , Object >();
256+ Map <String , Object > historyEnvelope1 = new HashMap <>();
257+ Map <String , Object > historyItem1 = new HashMap <>();
258258 historyItem1 .put ("a" , 11 );
259259 historyItem1 .put ("b" , 22 );
260260 historyEnvelope1 .put ("timetoken" , 1111 );
261261 historyEnvelope1 .put ("message" , historyItem1 );
262262
263- Map <String , Object > historyEnvelope2 = new HashMap <String , Object >();
264- Map <String , Object > historyItem2 = new HashMap <String , Object >();
263+ Map <String , Object > historyEnvelope2 = new HashMap <>();
264+ Map <String , Object > historyItem2 = new HashMap <>();
265265 historyItem2 .put ("a" , 33 );
266266 historyItem2 .put ("b" , 44 );
267267 historyEnvelope2 .put ("timetoken" , 2222 );
@@ -283,18 +283,18 @@ public void testChannelIsEmpty() throws PubNubException {
283283 @ Test
284284 public void testOperationTypeSuccessAsync () throws PubNubException {
285285
286- List <Object > testArray = new ArrayList <Object >();
287- List <Object > historyItems = new ArrayList <Object >();
286+ List <Object > testArray = new ArrayList <>();
287+ List <Object > historyItems = new ArrayList <>();
288288
289- Map <String , Object > historyEnvelope1 = new HashMap <String , Object >();
290- Map <String , Object > historyItem1 = new HashMap <String , Object >();
289+ Map <String , Object > historyEnvelope1 = new HashMap <>();
290+ Map <String , Object > historyItem1 = new HashMap <>();
291291 historyItem1 .put ("a" , 11 );
292292 historyItem1 .put ("b" , 22 );
293293 historyEnvelope1 .put ("timetoken" , 1111 );
294294 historyEnvelope1 .put ("message" , historyItem1 );
295295
296- Map <String , Object > historyEnvelope2 = new HashMap <String , Object >();
297- Map <String , Object > historyItem2 = new HashMap <String , Object >();
296+ Map <String , Object > historyEnvelope2 = new HashMap <>();
297+ Map <String , Object > historyItem2 = new HashMap <>();
298298 historyItem2 .put ("a" , 33 );
299299 historyItem2 .put ("b" , 44 );
300300 historyEnvelope2 .put ("timetoken" , 2222 );
@@ -326,18 +326,18 @@ public void onResponse(PNHistoryResult result, PNStatus status) {
326326
327327 @ Test
328328 public void testSyncCountReverseStartEndSuccess () throws IOException , PubNubException {
329- List <Object > testArray = new ArrayList <Object >();
330- List <Object > historyItems = new ArrayList <Object >();
329+ List <Object > testArray = new ArrayList <>();
330+ List <Object > historyItems = new ArrayList <>();
331331
332- Map <String , Object > historyEnvelope1 = new HashMap <String , Object >();
333- Map <String , Object > historyItem1 = new HashMap <String , Object >();
332+ Map <String , Object > historyEnvelope1 = new HashMap <>();
333+ Map <String , Object > historyItem1 = new HashMap <>();
334334 historyItem1 .put ("a" , 11 );
335335 historyItem1 .put ("b" , 22 );
336336 historyEnvelope1 .put ("timetoken" , 1111 );
337337 historyEnvelope1 .put ("message" , historyItem1 );
338338
339- Map <String , Object > historyEnvelope2 = new HashMap <String , Object >();
340- Map <String , Object > historyItem2 = new HashMap <String , Object >();
339+ Map <String , Object > historyEnvelope2 = new HashMap <>();
340+ Map <String , Object > historyItem2 = new HashMap <>();
341341 historyItem2 .put ("a" , 33 );
342342 historyItem2 .put ("b" , 44 );
343343 historyEnvelope2 .put ("timetoken" , 2222 );
@@ -379,18 +379,18 @@ public void testSyncCountReverseStartEndSuccess() throws IOException, PubNubExce
379379
380380 @ Test (expected =UnsupportedOperationException .class )
381381 public void testSyncProcessMessageError () throws IOException , PubNubException {
382- List <Object > testArray = new ArrayList <Object >();
383- List <Object > historyItems = new ArrayList <Object >();
382+ List <Object > testArray = new ArrayList <>();
383+ List <Object > historyItems = new ArrayList <>();
384384
385- Map <String , Object > historyEnvelope1 = new HashMap <String , Object >();
386- Map <String , Object > historyItem1 = new HashMap <String , Object >();
385+ Map <String , Object > historyEnvelope1 = new HashMap <>();
386+ Map <String , Object > historyItem1 = new HashMap <>();
387387 historyItem1 .put ("a" , 11 );
388388 historyItem1 .put ("b" , 22 );
389389 historyEnvelope1 .put ("timetoken" , 1111 );
390390 historyEnvelope1 .put ("message" , historyItem1 );
391391
392- Map <String , Object > historyEnvelope2 = new HashMap <String , Object >();
393- Map <String , Object > historyItem2 = new HashMap <String , Object >();
392+ Map <String , Object > historyEnvelope2 = new HashMap <>();
393+ Map <String , Object > historyItem2 = new HashMap <>();
394394 historyItem2 .put ("a" , 33 );
395395 historyItem2 .put ("b" , 44 );
396396 historyEnvelope2 .put ("timetoken" , 2222 );
0 commit comments