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 2222import javax .jms .JMSException ;
2323
2424import org .junit .Test ;
25- import org .mockito .Mockito ;
2625
2726import static org .junit .Assert .assertEquals ;
2827import static org .mockito .BDDMockito .given ;
28+ import static org .mockito .BDDMockito .willThrow ;
2929import static org .mockito .Mockito .mock ;
3030import static org .mockito .Mockito .times ;
3131import static org .mockito .Mockito .verify ;
@@ -86,8 +86,8 @@ public void jmsBrokerUsesFailover() throws JMSException {
8686 given (connectionMetaData .getJMSProviderName ()).willReturn ("JMS test provider" );
8787 Connection connection = mock (Connection .class );
8888 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 ();
9191 given (connectionFactory .createConnection ())
9292 .willReturn (connection );
9393 JmsHealthIndicator indicator = new JmsHealthIndicator (connectionFactory );
You can’t perform that action at this time.
0 commit comments