@@ -65,15 +65,16 @@ public void close() {
6565 public void defaultId () {
6666 this .context = SpringApplication .run (InboundMessageHandlerConfiguration .class , "--server.port=0" );
6767 assertThat (this .context .getBean (BusProperties .class ).getId ().startsWith ("application:0:" ))
68- .as ("Wrong ID: " + this .context .getBean (BusProperties .class ).getId ()).isTrue ();
68+ .as ("Wrong ID: " + this .context .getBean (BusProperties .class ).getId ())
69+ .isTrue ();
6970 }
7071
7172 @ Test
7273 public void inboundNotForSelf () {
7374 this .context = SpringApplication .run (InboundMessageHandlerConfiguration .class , "--spring.cloud.bus.id=foo" ,
7475 "--server.port=0" );
7576 this .context .getBean (BusConstants .INPUT , MessageChannel .class )
76- .send (new GenericMessage <>(new RefreshRemoteApplicationEvent (this , "bar" , "bar" )));
77+ .send (new GenericMessage <>(new RefreshRemoteApplicationEvent (this , "bar" , "bar" )));
7778 assertThat (this .context .getBean (InboundMessageHandlerConfiguration .class ).refresh ).isNull ();
7879 }
7980
@@ -82,7 +83,7 @@ public void inboundFromSelf() {
8283 this .context = SpringApplication .run (InboundMessageHandlerConfiguration .class , "--spring.cloud.bus.id=foo" ,
8384 "--server.port=0" );
8485 this .context .getBean (BusConstants .INPUT , MessageChannel .class )
85- .send (new GenericMessage <>(new RefreshRemoteApplicationEvent (this , "foo" , (String ) null )));
86+ .send (new GenericMessage <>(new RefreshRemoteApplicationEvent (this , "foo" , (String ) null )));
8687 assertThat (this .context .getBean (InboundMessageHandlerConfiguration .class ).refresh ).isNull ();
8788 }
8889
@@ -91,7 +92,7 @@ public void inboundNotFromSelf() {
9192 this .context = SpringApplication .run (InboundMessageHandlerConfiguration .class , "--spring.cloud.bus.id=bar" ,
9293 "--server.port=0" );
9394 this .context .getBean (BusConstants .INPUT , MessageChannel .class )
94- .send (new GenericMessage <>(new RefreshRemoteApplicationEvent (this , "foo" , (String ) null )));
95+ .send (new GenericMessage <>(new RefreshRemoteApplicationEvent (this , "foo" , (String ) null )));
9596 assertThat (this .context .getBean (InboundMessageHandlerConfiguration .class ).refresh ).isNotNull ();
9697 }
9798
@@ -103,7 +104,7 @@ public void inboundNotFromSelfWithAck() throws Exception {
103104 new String [] { "--spring.cloud.bus.id=bar" , "--server.port=0" ,
104105 "--spring.main.allow-bean-definition-overriding=true" });
105106 this .context .getBean (BusConstants .INPUT , MessageChannel .class )
106- .send (new GenericMessage <>(new RefreshRemoteApplicationEvent (this , "foo" , (String ) null )));
107+ .send (new GenericMessage <>(new RefreshRemoteApplicationEvent (this , "foo" , (String ) null )));
107108 RefreshRemoteApplicationEvent refresh = this .context .getBean (InboundMessageHandlerConfiguration .class ).refresh ;
108109 assertThat (refresh ).isNotNull ();
109110 TestStreamBusBridge busBridge = this .context .getBean (TestStreamBusBridge .class );
@@ -135,8 +136,9 @@ public void inboundAckWithTrace() throws InterruptedException {
135136 AckMessageConfiguration .class },
136137 new String [] { "--spring.cloud.bus.trace.enabled=true" , "--spring.cloud.bus.id=bar" ,
137138 "--server.port=0" });
138- this .context .getBean (BusConsumer .class ).accept (new AckRemoteApplicationEvent (this , "foo" ,
139- new PathDestinationFactory ().getDestination (null ), "ID" , "bar" , RefreshRemoteApplicationEvent .class ));
139+ this .context .getBean (BusConsumer .class )
140+ .accept (new AckRemoteApplicationEvent (this , "foo" , new PathDestinationFactory ().getDestination (null ), "ID" ,
141+ "bar" , RefreshRemoteApplicationEvent .class ));
140142 AckMessageConfiguration ack = this .context .getBean (AckMessageConfiguration .class );
141143 assertThat (ack .latch .await (5 , TimeUnit .SECONDS )).isTrue ();
142144 assertThat (ack .event ).isNotNull ();
@@ -166,7 +168,7 @@ public void inboundNotFromSelfPathPattern() {
166168 this .context = SpringApplication .run (InboundMessageHandlerConfiguration .class , "--spring.cloud.bus.id=bar:1000" ,
167169 "--server.port=0" );
168170 this .context .getBean (BusConstants .INPUT , MessageChannel .class )
169- .send (new GenericMessage <>(new RefreshRemoteApplicationEvent (this , "foo" , "bar:*" )));
171+ .send (new GenericMessage <>(new RefreshRemoteApplicationEvent (this , "foo" , "bar:*" )));
170172 assertThat (this .context .getBean (InboundMessageHandlerConfiguration .class ).refresh ).isNotNull ();
171173 }
172174
@@ -175,7 +177,7 @@ public void inboundNotFromSelfDeepPathPattern() {
175177 this .context = SpringApplication .run (InboundMessageHandlerConfiguration .class ,
176178 "--spring.cloud.bus.id=bar:test:1000" , "--server.port=0" );
177179 this .context .getBean (BusConstants .INPUT , MessageChannel .class )
178- .send (new GenericMessage <>(new RefreshRemoteApplicationEvent (this , "foo" , "bar:**" )));
180+ .send (new GenericMessage <>(new RefreshRemoteApplicationEvent (this , "foo" , "bar:**" )));
179181 assertThat (this .context .getBean (InboundMessageHandlerConfiguration .class ).refresh ).isNotNull ();
180182 }
181183
@@ -184,7 +186,7 @@ public void inboundNotFromSelfFlatPattern() {
184186 this .context = SpringApplication .run (InboundMessageHandlerConfiguration .class , "--spring.cloud.bus.id=bar" ,
185187 "--server.port=0" );
186188 this .context .getBean (BusConstants .INPUT , MessageChannel .class )
187- .send (new GenericMessage <>(new RefreshRemoteApplicationEvent (this , "foo" , "bar*" )));
189+ .send (new GenericMessage <>(new RefreshRemoteApplicationEvent (this , "foo" , "bar*" )));
188190 assertThat (this .context .getBean (InboundMessageHandlerConfiguration .class ).refresh ).isNotNull ();
189191 }
190192
@@ -194,7 +196,7 @@ public void inboundNotFromSelfUnknown() {
194196 this .context = SpringApplication .run (InboundMessageHandlerConfiguration .class , "--spring.cloud.bus.id=bar" ,
195197 "--server.port=0" );
196198 this .context .getBean (BusConstants .INPUT , MessageChannel .class )
197- .send (new GenericMessage <>(new UnknownRemoteApplicationEvent (this , "UnknownEvent" , "yada" .getBytes ())));
199+ .send (new GenericMessage <>(new UnknownRemoteApplicationEvent (this , "UnknownEvent" , "yada" .getBytes ())));
198200 // No Exception expected
199201 }
200202
0 commit comments