if (source.getSubscriptionCommands() != null) { List<SubscriptionCommand> commands = new ArrayList<>( source.getSubscriptionCommands().size()); : source.getSubscriptionCommands()) { SubscriptionCommand copy = new SubscriptionCommand(); copy.setTopicId(command.getTopicId());
@Test public void testCreateEmptyRequest() { NotificationTransport transport1 = new DefaultNotificationTransport(); Assert.assertNull(transport1.createEmptyNotificationRequest()); KaaClientState clientState = Mockito.mock(KaaClientState.class); NotificationTransport transport2 = new DefaultNotificationTransport(); Assert.assertNull(transport2.createEmptyNotificationRequest()); transport2.setClientState(clientState); NotificationSyncRequest request = transport2.createEmptyNotificationRequest(); Assert.assertNull(request.getAcceptedUnicastNotifications()); Assert.assertNull(request.getSubscriptionCommands()); Assert.assertEquals(TopicListHashCalculator.NULL_LIST_HASH, request.getTopicListHash()); }