/*
 * Copyright 2015-2016 the original author or authors.
 *
 * All rights reserved. This program and the accompanying materials are
 * made available under the terms of the Eclipse Public License v1.0 which
 * accompanies this distribution and is available at
 *
 * http://www.eclipse.org/legal/epl-v10.html
 */

package org.junit.gen5.engine.junit4.discovery;

import static org.junit.gen5.commons.util.ReflectionUtils.*;

import java.util.function.Predicate;

/**
 * @since 5.0
 */
class IsPotentialJUnit4TestClass implements Predicate<Class<?>> {

	@Override
	public boolean test(Class<?> candidate) {
		// Do not collapse into single return.
		if (isAbstract(candidate))
			return false;
		if (!isPublic(candidate))
			return false;
		if (candidate.isLocalClass())
			return false;
		return !candidate.isMemberClass();
	}

}

@@ -414,17 +414,94 @@
 onUtils.
-*
+isAbstract;%0Aimport static org.junit.gen5.commons.util.ReflectionUtils.isPublic
 ;%0A%0Aimpor
@@ -812,57 +812,8 @@
 se;%0A
-%09%09if (candidate.isLocalClass())%0A%09%09%09return false;%0A
 %09%09re

Remove check for local classes