/*
 * Copyright © 2016 <code@io7m.com> http://io7m.com
 * 
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
 * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

package com.io7m.jfunctional.tests;

import com.io7m.jequality.annotations.EqualityReference;
import com.io7m.jequality.validator.AnnotationRequirement;
import com.io7m.jequality.validator.EqualityValidator;
import com.io7m.jequality.validator.ValidatorResult;
import org.junit.Assert;
import org.junit.Test;
import org.reflections.Reflections;
import org.reflections.scanners.ResourcesScanner;
import org.reflections.scanners.SubTypesScanner;
import org.reflections.util.ClasspathHelper;
import org.reflections.util.ConfigurationBuilder;
import org.reflections.util.FilterBuilder;

import java.lang.reflect.Modifier;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;

@SuppressWarnings("static-method")
@EqualityReference
public final class EqualityTest
{
  private static Reflections setupReflections()
  {
    final List<ClassLoader> classLoadersList = new LinkedList<ClassLoader>();
    classLoadersList.add(ClasspathHelper.contextClassLoader());
    classLoadersList.add(ClasspathHelper.staticClassLoader());

    return new Reflections(new ConfigurationBuilder()
                             .setScanners(
                               new SubTypesScanner(false /* don't exclude Object.class */),
                               new ResourcesScanner())
                             .setUrls(
                               ClasspathHelper.forClassLoader(classLoadersList
                                                                .toArray(new ClassLoader[0])))
                             .filterInputsBy(
                               new FilterBuilder().include(FilterBuilder
                                                             .prefix(
                                                               "com.io7m.jfunctional"))));
  }

  @Test
  public void testEqualites()
  {
    final Reflections ref = EqualityTest.setupReflections();
    final Set<Class<? extends Object>> types =
      ref.getSubTypesOf(Object.class);

    for (final Class<? extends Object> c : types) {
      assert c != null;

      System.out.printf("Checking %s\n", c.getCanonicalName());
      System.out.flush();

      if (Modifier.isInterface(c.getModifiers())) {
        continue;
      }
      if (c.isAnonymousClass()) {
        continue;
      }

      Assert.assertEquals(ValidatorResult.VALIDATION_OK, EqualityValidator
        .validateClass(c, AnnotationRequirement.ANNOTATIONS_REQUIRED, true));
    }
  }
}

@@ -1484,43 +1484,8 @@
 t;%0A%0A
-@SuppressWarnings(%22static-method%22)%0A
 @Equ
@@ -1499,16 +1499,16 @@
 ference%0A
+
 public f
@@ -1818,16 +1818,23 @@
 ections(
+%0A      
 new Conf
@@ -1852,37 +1852,16 @@
 ilder()%0A
-                     
         
@@ -1874,37 +1874,16 @@
 anners(%0A
-                     
         
@@ -1945,37 +1945,16 @@
 ss */),%0A
-                     
         
@@ -1991,60 +1991,18 @@
     
-                     .setUrls(%0A                     
+.setUrls(%0A
     
@@ -2038,16 +2038,29 @@
 sLoader(
+%0A            
 classLoa
@@ -2071,73 +2071,8 @@
 List
-%0A                                                                
 .toA
@@ -2098,37 +2098,16 @@
 r%5B0%5D)))%0A
-                     
         
@@ -2123,37 +2123,16 @@
 putsBy(%0A
-                     
         
@@ -2165,155 +2165,42 @@
 ude(
-FilterBuilder%0A                                                             .prefix(%0A                                                               
+%0A            FilterBuilder.prefix(
 %22com

Remove suppression, format