Skip to content

Commit 0e0ea00

Browse files
committed
* Fix GroovySplitterTests for the current code base
1 parent 1bd5b66 commit 0e0ea00

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

spring-integration-groovy/src/test/java/org/springframework/integration/groovy/config/GroovySplitterTests.java

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -18,8 +18,7 @@
1818

1919
import static org.assertj.core.api.Assertions.assertThat;
2020

21-
import org.junit.Test;
22-
import org.junit.runner.RunWith;
21+
import org.junit.jupiter.api.Test;
2322

2423
import org.springframework.beans.factory.annotation.Autowired;
2524
import org.springframework.beans.factory.annotation.Qualifier;
@@ -32,16 +31,14 @@
3231
import org.springframework.messaging.Message;
3332
import org.springframework.messaging.MessageChannel;
3433
import org.springframework.messaging.MessageHandler;
35-
import org.springframework.test.context.ContextConfiguration;
36-
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
34+
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
3735

3836
/**
3937
* @author Mark Fisher
4038
* @author Artem Bilan
4139
* @since 2.0
4240
*/
43-
@ContextConfiguration
44-
@RunWith(SpringJUnit4ClassRunner.class)
41+
@SpringJUnitConfig
4542
public class GroovySplitterTests {
4643

4744
@Autowired
@@ -82,10 +79,10 @@ public void inlineScript() {
8279
public void testInt2433VerifyRiddingOfMessageProcessorsWrapping() {
8380
assertThat(this.groovySplitterMessageHandler instanceof MethodInvokingSplitter).isTrue();
8481
@SuppressWarnings("rawtypes")
85-
MessageProcessor messageProcessor = TestUtils.getPropertyValue(this.groovySplitterMessageHandler,
86-
"messageProcessor", MessageProcessor.class);
82+
MessageProcessor messageProcessor =
83+
TestUtils.getPropertyValue(this.groovySplitterMessageHandler, "processor", MessageProcessor.class);
8784
//before it was MethodInvokingMessageProcessor
88-
assertThat(messageProcessor instanceof GroovyScriptExecutingMessageProcessor).isTrue();
85+
assertThat(messageProcessor).isInstanceOf(GroovyScriptExecutingMessageProcessor.class);
8986
}
9087

9188
}

0 commit comments

Comments
 (0)