@@ -147,7 +147,7 @@ public void enqueuePersistsMutationAndNotifiesObserver() throws DataStoreExcepti
147147 Collections .singletonList (converter .toRecord (createJameson )),
148148 storage .query (PersistentRecord .class )
149149 );
150- assertTrue (mutationOutbox .hasPendingMutation (jameson .getId (), jameson .getClass ().getName ()));
150+ assertTrue (mutationOutbox .hasPendingMutation (jameson .getId (), jameson .getClass ().getSimpleName ()));
151151 assertEquals (createJameson , mutationOutbox .peek ());
152152 }
153153
@@ -208,8 +208,8 @@ public void loadPreparesOutbox() throws DataStoreException, InterruptedException
208208 loadObserver .dispose ();
209209
210210 // Assert: items are in the outbox.
211- assertTrue (mutationOutbox .hasPendingMutation (tony .getId (), tony .getClass ().getName ()));
212- assertTrue (mutationOutbox .hasPendingMutation (sam .getId (), sam .getClass ().getName ()));
211+ assertTrue (mutationOutbox .hasPendingMutation (tony .getId (), tony .getClass ().getSimpleName ()));
212+ assertTrue (mutationOutbox .hasPendingMutation (sam .getId (), sam .getClass ().getSimpleName ()));
213213
214214 // Tony is first, since he is the older of the two mutations.
215215 assertEquals (updateTony , mutationOutbox .peek ());
@@ -240,7 +240,7 @@ public void removeRemovesChangesFromQueue() throws DataStoreException, Interrupt
240240 assertEquals (0 , storage .query (PersistentRecord .class ).size ());
241241
242242 assertNull (mutationOutbox .peek ());
243- assertFalse (mutationOutbox .hasPendingMutation (bill .getId (), bill .getClass ().getName ()));
243+ assertFalse (mutationOutbox .hasPendingMutation (bill .getId (), bill .getClass ().getSimpleName ()));
244244 }
245245
246246 /**
@@ -330,8 +330,8 @@ public void hasPendingMutationReturnsTrueForExistingModelMutation() {
330330 boolean completed = mutationOutbox .enqueue (pendingMutation ).blockingAwait (TIMEOUT_MS , TimeUnit .MILLISECONDS );
331331
332332 assertTrue (completed );
333- assertTrue (mutationOutbox .hasPendingMutation (modelId , joe .getClass ().getName ()));
334- assertFalse (mutationOutbox .hasPendingMutation (mutationId .toString (), mutationId .getClass ().getName ()));
333+ assertTrue (mutationOutbox .hasPendingMutation (modelId , joe .getClass ().getSimpleName ()));
334+ assertFalse (mutationOutbox .hasPendingMutation (mutationId .toString (), mutationId .getClass ().getSimpleName ()));
335335 }
336336
337337 /**
@@ -357,9 +357,9 @@ public void hasPendingMutationReturnsFalseForItemNotInStore() throws DataStoreEx
357357 mutationId , joe , schema , PendingMutation .Type .CREATE , QueryPredicates .all ()
358358 );
359359
360- assertFalse (mutationOutbox .hasPendingMutation (joeId , joe .getClass ().getName ()));
360+ assertFalse (mutationOutbox .hasPendingMutation (joeId , joe .getClass ().getSimpleName ()));
361361 assertFalse (mutationOutbox .hasPendingMutation (unrelatedMutation .getMutationId ().toString (),
362- unrelatedMutation .getClass ().getName ()));
362+ unrelatedMutation .getClass ().getSimpleName ()));
363363 }
364364
365365 /**
@@ -385,7 +385,7 @@ public void hasPendingMutationReturnsFalseForModelMutationWithSamePrimaryKeyForD
385385
386386 // Act & Assert: Enqueue and verify BlogOwner
387387 assertTrue (mutationOutbox .enqueue (pendingBlogOwnerMutation ).blockingAwait (TIMEOUT_MS , TimeUnit .MILLISECONDS ));
388- assertTrue (mutationOutbox .hasPendingMutation (modelId , blogOwner .getClass ().getName ()));
388+ assertTrue (mutationOutbox .hasPendingMutation (modelId , blogOwner .getClass ().getSimpleName ()));
389389
390390 // Act & Assert: Enqueue and verify Author
391391 Author author = Author .builder ()
@@ -394,7 +394,7 @@ public void hasPendingMutationReturnsFalseForModelMutationWithSamePrimaryKeyForD
394394 .build ();
395395
396396 // Check hasPendingMutation returns False for Author with same Primary Key (id) as BlogOwner
397- assertFalse (mutationOutbox .hasPendingMutation (modelId , author .getClass ().getName ()));
397+ assertFalse (mutationOutbox .hasPendingMutation (modelId , author .getClass ().getSimpleName ()));
398398
399399 PendingMutation <Author > pendingAuthorMutation = PendingMutation .instance (
400400 mutationId , author , ModelSchema .fromModelClass (Author .class ),
@@ -403,7 +403,7 @@ public void hasPendingMutationReturnsFalseForModelMutationWithSamePrimaryKeyForD
403403 assertTrue (mutationOutbox .enqueue (pendingAuthorMutation ).blockingAwait (TIMEOUT_MS , TimeUnit .MILLISECONDS ));
404404
405405 // Make sure Author Mutation is stored
406- assertTrue (mutationOutbox .hasPendingMutation (modelId , author .getClass ().getName ()));
406+ assertTrue (mutationOutbox .hasPendingMutation (modelId , author .getClass ().getSimpleName ()));
407407
408408 // Act & Assert: Enqueue and verify Author
409409 Post post = Post .builder ()
@@ -414,7 +414,7 @@ public void hasPendingMutationReturnsFalseForModelMutationWithSamePrimaryKeyForD
414414 .build ();
415415
416416 // Check hasPendingMutation returns False for Post with same Primary Key (id) as BlogOwner
417- assertFalse (mutationOutbox .hasPendingMutation (modelId , post .getClass ().getName ()));
417+ assertFalse (mutationOutbox .hasPendingMutation (modelId , post .getClass ().getSimpleName ()));
418418
419419 PendingMutation <Post > pendingPostMutation = PendingMutation .instance (
420420 mutationId , post , ModelSchema .fromModelClass (Post .class ),
@@ -423,7 +423,7 @@ public void hasPendingMutationReturnsFalseForModelMutationWithSamePrimaryKeyForD
423423 assertTrue (mutationOutbox .enqueue (pendingPostMutation ).blockingAwait (TIMEOUT_MS , TimeUnit .MILLISECONDS ));
424424
425425 // Make sure Post Mutation is stored
426- assertTrue (mutationOutbox .hasPendingMutation (modelId , post .getClass ().getName ()));
426+ assertTrue (mutationOutbox .hasPendingMutation (modelId , post .getClass ().getSimpleName ()));
427427 }
428428
429429 /**
@@ -474,7 +474,7 @@ public void mutationEnqueueForModelWithDuplicatePrimaryKeyThrowsDatastoreExcepti
474474
475475 // Additional Checks: Peek the Mutation outbox, existing mutation should be present.
476476 assertTrue (mutationOutbox .hasPendingMutation (existingBlogOwner .getPrimaryKeyString (),
477- existingBlogOwner .getClass ().getName ()));
477+ existingBlogOwner .getClass ().getSimpleName ()));
478478 assertEquals (existingCreation , mutationOutbox .peek ());
479479 }
480480
@@ -521,7 +521,7 @@ public void existingCreationIncomingCreationYieldsError() throws AmplifyExceptio
521521
522522 // Existing mutation still attainable as next mutation (right now, its the ONLY mutation in outbox)
523523 assertTrue (mutationOutbox .hasPendingMutation (modelInExistingMutation .getPrimaryKeyString (),
524- modelInExistingMutation .getClass ().getName ()));
524+ modelInExistingMutation .getClass ().getSimpleName ()));
525525 assertEquals (existingCreation , mutationOutbox .peek ());
526526 }
527527
@@ -567,7 +567,7 @@ public void existingUpdateIncomingCreationYieldsError() throws AmplifyException,
567567
568568 // Existing mutation still attainable as next mutation (right now, its the ONLY mutation in outbox)
569569 assertTrue (mutationOutbox .hasPendingMutation (modelInExistingMutation .getPrimaryKeyString (),
570- modelInExistingMutation .getClass ().getName ()));
570+ modelInExistingMutation .getClass ().getSimpleName ()));
571571 assertEquals (existingUpdate , mutationOutbox .peek ());
572572 }
573573
@@ -614,7 +614,7 @@ public void existingDeletionIncomingCreationYieldsError() throws AmplifyExceptio
614614
615615 // Existing mutation still attainable as next mutation (right now, its the ONLY mutation in outbox)
616616 assertTrue (mutationOutbox .hasPendingMutation (modelInExistingMutation .getPrimaryKeyString (),
617- modelInExistingMutation .getClass ().getName ()));
617+ modelInExistingMutation .getClass ().getSimpleName ()));
618618 assertEquals (existingDeletion , mutationOutbox .peek ());
619619 }
620620
@@ -660,7 +660,7 @@ public void existingDeletionIncomingUpdateYieldsError() throws AmplifyException,
660660
661661 // Existing mutation still attainable as next mutation (right now, its the ONLY mutation in outbox)
662662 assertTrue (mutationOutbox .hasPendingMutation (modelInExistingMutation .getPrimaryKeyString (),
663- modelInExistingMutation .getClass ().getName ()));
663+ modelInExistingMutation .getClass ().getSimpleName ()));
664664 assertEquals (existingDeletion , mutationOutbox .peek ());
665665 }
666666
@@ -1186,7 +1186,7 @@ public void nextItemForModelIdReturnsFirstEnqueued() throws DataStoreException {
11861186 assertTrue (completed );
11871187 assertEquals (
11881188 firstMutation ,
1189- mutationOutbox .getMutationForModelId (originalJoe .getId (), originalJoe .getClass ().getName ())
1189+ mutationOutbox .getMutationForModelId (originalJoe .getId (), originalJoe .getClass ().getSimpleName ())
11901190 );
11911191 }
11921192
0 commit comments