private static Class<?>[] getClassesInPackage(Class<?> klass) {
		String packageSearchPath = ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX + "/" +
				klass.getPackage().getName().replaceAll("\\.", "/") + "/*" + TEST_CLASSNAME_SUFFIX + ".class";
		ArrayList<Class<?>> results = new ArrayList<Class<?>>();
		ResourcePatternResolver resourcePatternResolver = new PathMatchingResourcePatternResolver();
		try {
			Resource[] resources = resourcePatternResolver.getResources(packageSearchPath);
			if (resources != null) {
				for (Resource resource : resources) {
					String unqualifiedClassName = resource.getFilename().replace(".class", "");
					String className = klass.getPackage().getName() + "." + unqualifiedClassName;
					Class<?> candidate = ClassUtils.resolveClassName(className, klass.getClassLoader());
					if (!Modifier.isAbstract(candidate.getModifiers())) {
						results.add(candidate);
					}

				}
			}
		}
		catch (IOException e) {
			throw new RuntimeException(e);
		}
		return results.toArray(new Class<?>[results.size()]);
	}
@return selected classes in the current package
spring-xd-test/src/main/java/org/springframework/xd/test/PackageSuiteRunner.java