mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Merge branch '1.3.x'
This commit is contained in:
commit
c662986628
@ -22,10 +22,10 @@ import javax.jms.ConnectionMetaData;
|
||||
import javax.jms.JMSException;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.mockito.Mockito;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.BDDMockito.given;
|
||||
import static org.mockito.BDDMockito.willThrow;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
@ -86,8 +86,8 @@ public class JmsHealthIndicatorTests {
|
||||
given(connectionMetaData.getJMSProviderName()).willReturn("JMS test provider");
|
||||
Connection connection = mock(Connection.class);
|
||||
given(connection.getMetaData()).willReturn(connectionMetaData);
|
||||
Mockito.doThrow(new JMSException("Could not start", "123"))
|
||||
.when(connection).start();
|
||||
willThrow(new JMSException("Could not start", "123"))
|
||||
.given(connection).start();
|
||||
given(connectionFactory.createConnection())
|
||||
.willReturn(connection);
|
||||
JmsHealthIndicator indicator = new JmsHealthIndicator(connectionFactory);
|
||||
|
Loading…
Reference in New Issue
Block a user