diff --git a/src/test/java/org/springframework/data/repository/config/ResourceReaderRepositoryPopulatorBeanDefinitionParserIntegrationTests.java b/src/test/java/org/springframework/data/repository/config/ResourceReaderRepositoryPopulatorBeanDefinitionParserIntegrationTests.java index dfe2a849f..8323bb831 100644 --- a/src/test/java/org/springframework/data/repository/config/ResourceReaderRepositoryPopulatorBeanDefinitionParserIntegrationTests.java +++ b/src/test/java/org/springframework/data/repository/config/ResourceReaderRepositoryPopulatorBeanDefinitionParserIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2014 the original author or authors. + * Copyright 2012-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,6 @@ import org.junit.Test; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.core.SpringVersion; import org.springframework.core.io.ClassPathResource; import org.springframework.data.repository.init.Jackson2ResourceReader; import org.springframework.data.repository.init.ResourceReaderRepositoryPopulator; @@ -98,11 +97,7 @@ public class ResourceReaderRepositoryPopulatorBeanDefinitionParserIntegrationTes } private static ClassPathResource getPopulatorResource() { - - String springVersion = SpringVersion.getVersion(); - String populatorsResourceName = springVersion.startsWith("4") ? "populators-spring-4.0.xml" : "populators.xml"; - - return new ClassPathResource(populatorsResourceName, + return new ClassPathResource("populators.xml", ResourceReaderRepositoryPopulatorBeanDefinitionParserIntegrationTests.class); } } diff --git a/src/test/java/org/springframework/data/web/querydsl/QuerydslPredicateArgumentResolverUnitTests.java b/src/test/java/org/springframework/data/web/querydsl/QuerydslPredicateArgumentResolverUnitTests.java index 6deefbcd2..552541565 100644 --- a/src/test/java/org/springframework/data/web/querydsl/QuerydslPredicateArgumentResolverUnitTests.java +++ b/src/test/java/org/springframework/data/web/querydsl/QuerydslPredicateArgumentResolverUnitTests.java @@ -254,7 +254,7 @@ public class QuerydslPredicateArgumentResolverUnitTests { private static MethodParameter getMethodParameterFor(String methodName, Class... args) throws RuntimeException { try { - return new MethodParameter(Sample.class.getMethod(methodName, args), 0); + return new MethodParameter(Sample.class.getMethod(methodName, args), args.length == 0 ? -1 : 0); } catch (NoSuchMethodException e) { throw new RuntimeException(e); } diff --git a/src/test/resources/org/springframework/data/repository/config/populators-spring-4.0.xml b/src/test/resources/org/springframework/data/repository/config/populators.xml similarity index 100% rename from src/test/resources/org/springframework/data/repository/config/populators-spring-4.0.xml rename to src/test/resources/org/springframework/data/repository/config/populators.xml