urbanairship-core/src/test/java/com/urbanairship/push/NamedUserJobHandlerTest.java
@Test
    public void testUpdateNamedUserTagsNoNamedUser() {
        // Return a null named user ID
        when(namedUser.getId()).thenReturn(null);

        // Perform the update
        JobInfo jobInfo = JobInfo.newBuilder().setAction(NamedUserJobHandler.ACTION_UPDATE_TAG_GROUPS).build();
        Assert.assertEquals(JobInfo.JOB_FINISHED, jobHandler.performJob(jobInfo));

        // Verify updateNamedUserTags not called when channel ID doesn't exist
        verifyZeroInteractions(tagGroupRegistrar);
    }
/**
     * Test update named user tags without named user ID fails.
     */
Test update named user tags without named user ID fails.
Test update named user tags without named user ID fails .
@Test
    public void testUpdateNamedUserTagsNoNamedUser() {
        when(namedUser.getId()).thenReturn(null);
        JobInfo jobInfo = JobInfo.newBuilder().setAction(NamedUserJobHandler.ACTION_UPDATE_TAG_GROUPS).build();
        Assert.assertEquals(JobInfo.JOB_FINISHED, jobHandler.performJob(jobInfo));
        verifyZeroInteractions(tagGroupRegistrar);
    }
@ Test public void testUpdateNamedUserTagsNoNamedUser ( ) { when ( namedUser . getId ( ) ) . thenReturn ( null ) ; JobInfo jobInfo = JobInfo . newBuilder ( ) . setAction ( NamedUserJobHandler . ACTION_UPDATE_TAG_GROUPS ) . build ( ) ; Assert . assertEquals ( JobInfo . JOB_FINISHED , jobHandler . performJob ( jobInfo ) ) ; verifyZeroInteractions ( tagGroupRegistrar ) ; }
Test update named user tags without named user ID fails.
Test update named user tags without named user ID fails .
// Return a null named user ID // Perform the update // Verify updateNamedUserTags not called when channel ID doesn't exist