diff --git a/spring-boot-di/src/test/java/com/baeldung/componentscan/filter/aspectj/ComponentScanAspectJFilterAppIntegrationTest.java b/spring-boot-di/src/test/java/com/baeldung/componentscan/filter/aspectj/ComponentScanAspectJFilterAppIntegrationTest.java index 44ee7534a8..945a0085f6 100644 --- a/spring-boot-di/src/test/java/com/baeldung/componentscan/filter/aspectj/ComponentScanAspectJFilterAppIntegrationTest.java +++ b/spring-boot-di/src/test/java/com/baeldung/componentscan/filter/aspectj/ComponentScanAspectJFilterAppIntegrationTest.java @@ -22,7 +22,7 @@ public class ComponentScanAspectJFilterAppIntegrationTest { public void whenAspectJFilterIsUsed_thenComponentScanShouldRegisterBeanMatchingAspectJCreteria() { ApplicationContext applicationContext = new AnnotationConfigApplicationContext(ComponentScanAspectJFilterApp.class); List beans = Arrays.stream(applicationContext.getBeanDefinitionNames()) - .filter(bean -> !bean.contains("org.springframework") && !bean.contains("componentScanCustomFilterApp")) + .filter(bean -> !bean.contains("org.springframework") && !bean.contains("componentScanAspectJFilterApp")) .collect(Collectors.toList()); assertThat(beans.size(), equalTo(1)); assertThat(beans.get(0), equalTo("elephant"));