### Question:
Classes { @SuppressWarnings( "raw" ) public static Set<Class<?>> interfacesWithMethods( Set<Class<?>> interfaces ) { Set<Class<?>> newSet = new LinkedHashSet<>(); for( Class type : interfaces ) { if( type.isInterface() && type.getDeclaredMethods().length > 0 ) { newSet.add( type ); } } return newSet; } private  Classes(); static Type typeOf( AccessibleObject from ); static Stream<Type> typesOf( Stream<? extends Type> types ); static Stream<? extends Type> typesOf( Type type ); static Stream<? extends Type> interfacesOf( Stream<? extends Type> types ); static Stream<? extends Type> interfacesOf( Type type ); static Stream<Class<?>> classHierarchy( Class<?> type ); static Type wrapperClass( Type type ); static Predicate<Class<?>> isAssignableFrom( final Class<?> clazz ); static Predicate<Object> instanceOf( final Class<?> clazz ); static Predicate<Class<?>> hasModifier( final int classModifier ); static Function<Type, Stream<T>> forClassHierarchy( final Function<Class<?>, Stream<T>> function ); static Function<Type, Stream<T>> forTypes( final Function<Type, Stream<T>> function ); @SuppressWarnings( "raw" ) static Set<Class<?>> interfacesWithMethods( Set<Class<?>> interfaces ); static String simpleGenericNameOf( Type type ); @SuppressWarnings( "UnusedDeclaration" ) static AnnotationType findAnnotationOfTypeOrAnyOfSuperTypes( Class<?> type, Class<AnnotationType> annotationClass ); static Predicate<Member> memberNamed( final String name ); @SuppressWarnings( "raw" ) static Type resolveTypeVariable( TypeVariable name, Class declaringClass, Class topClass ); @SuppressWarnings( "raw" ) static String toURI( final Class clazz ); static String toURI( String className ); static String toClassName( String uri ); static String normalizeClassToURI( String className ); static String denormalizeURIToClass( String uriPart ); static Predicate<ModelDescriptor> modelTypeSpecification( final String className ); @SuppressWarnings( "raw" ) static Predicate<ModelDescriptor> exactTypeSpecification( final Class type ); @SuppressWarnings( "raw" ) static Predicate<ModelDescriptor> assignableTypeSpecification( final Class<?> type ); @SuppressWarnings( "raw" ) static String toString( Stream<? extends Class> types ); static Function<Type, String> toClassName(); static final Function<Type, Class<?>> RAW_CLASS; }### Answer:
@Test public void givenClassWithInterfacesWhenGetInterfacesWithMethodsThenGetCorrectSet() { HashSet<Class<?>> interfaces = new HashSet<Class<?>>(); interfaces.add( B.class ); Set<Class<?>> types = interfacesWithMethods( interfaces ); assertThat( "one interface returned", types.size(), equalTo( 1 ) ); assertThat( "correct interface returned", types.contains( B.class ), is( true ) ); }