File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 22
22
import javax .jms .JMSException ;
23
23
24
24
import org .junit .Test ;
25
- import org .mockito .Mockito ;
26
25
27
26
import static org .junit .Assert .assertEquals ;
28
27
import static org .mockito .BDDMockito .given ;
28
+ import static org .mockito .BDDMockito .willThrow ;
29
29
import static org .mockito .Mockito .mock ;
30
30
import static org .mockito .Mockito .times ;
31
31
import static org .mockito .Mockito .verify ;
@@ -86,8 +86,8 @@ public void jmsBrokerUsesFailover() throws JMSException {
86
86
given (connectionMetaData .getJMSProviderName ()).willReturn ("JMS test provider" );
87
87
Connection connection = mock (Connection .class );
88
88
given (connection .getMetaData ()).willReturn (connectionMetaData );
89
- Mockito . doThrow (new JMSException ("Could not start" , "123" ))
90
- .when (connection ).start ();
89
+ willThrow (new JMSException ("Could not start" , "123" ))
90
+ .given (connection ).start ();
91
91
given (connectionFactory .createConnection ())
92
92
.willReturn (connection );
93
93
JmsHealthIndicator indicator = new JmsHealthIndicator (connectionFactory );
You can’t perform that action at this time.
0 commit comments