@Test public void processChannelChanges_update_missingSubscription() { final Connector connector = createConnector(); final Connection connection = newConnection( connector ); final String newFilter = ValueUtil.randomString(); final ChannelChange[] channelChanges = new ChannelChange[]{ ChannelChange.create( "=0.42", newFilter ) }; final MessageResponse response = setCurrentMessageResponse( connection, ChangeSetMessage.create( null, null, null, channelChanges, null ) ); response.setParsedChannelChanges( Collections.singletonList( ChannelChangeDescriptor.from( 1, channelChanges[ 0 ] ) ) ); assertTrue( response.needsChannelChangesProcessed() ); assertEquals( response.getChannelUpdateCount(), 0 ); final TestSpyEventHandler handler = registerTestSpyEventHandler(); final IllegalStateException exception = expectThrows( IllegalStateException.class, connector::processChannelChanges ); assertTrue( response.needsChannelChangesProcessed() ); assertEquals( response.getChannelUpdateCount(), 0 ); assertEquals( exception.getMessage(), "Replicant-0033: Received ChannelChange of type UPDATE for address 1.0.42 but no such subscription exists." ); handler.assertEventCount( 0 ); }
@Nonnull static Connector create( @Nullable final ReplicantContext context, @Nonnull final SystemSchema schema, @Nonnull final Transport transport ) { return new Arez_Connector( context, schema, transport ); }
Connector extends ReplicantService { @Nonnull static Connector create( @Nullable final ReplicantContext context, @Nonnull final SystemSchema schema, @Nonnull final Transport transport ) { return new Arez_Connector( context, schema, transport ); } }
Connector extends ReplicantService { @Nonnull static Connector create( @Nullable final ReplicantContext context, @Nonnull final SystemSchema schema, @Nonnull final Transport transport ) { return new Arez_Connector( context, schema, transport ); } Connector( @Nullable final ReplicantContext context,
             @Nonnull final SystemSchema schema,
             @Nonnull final Transport transport ); }
Connector extends ReplicantService { @Nonnull static Connector create( @Nullable final ReplicantContext context, @Nonnull final SystemSchema schema, @Nonnull final Transport transport ) { return new Arez_Connector( context, schema, transport ); } Connector( @Nullable final ReplicantContext context,
             @Nonnull final SystemSchema schema,
             @Nonnull final Transport transport ); @Override String toString(); }
Connector extends ReplicantService { @Nonnull static Connector create( @Nullable final ReplicantContext context, @Nonnull final SystemSchema schema, @Nonnull final Transport transport ) { return new Arez_Connector( context, schema, transport ); } Connector( @Nullable final ReplicantContext context,
             @Nonnull final SystemSchema schema,
             @Nonnull final Transport transport ); @Override String toString();  }