package no.saua.remock.internal;

import java.util.Collections;
import java.util.List;
import java.util.Objects;

public class RejectBeanClassDefinition extends Entity<RejectBeanClassDefinition> implements Rejecter {

    private final Class<?> rejectClass;
    private final List<Class<?>> exceptClasses;

    public RejectBeanClassDefinition(Class<?> rejectClass) {
        this(rejectClass, Collections.<Class<?>>emptyList());
    }

    public RejectBeanClassDefinition(Class<?> rejectClass, List<Class<?>> exceptClasses) {
        assert rejectClass != null;
        assert exceptClasses != null;
        this.rejectClass = rejectClass;
        this.exceptClasses = exceptClasses;
    }

    @Override
    public boolean shouldReject(String beanName, Class<?> beanClass) {
        if (!rejectClass.isAssignableFrom(beanClass)) {
            // -> Class does not match
            return false;
        }

        // E-> Class matches
        for (Class<?> clazz : exceptClasses) {
            if (clazz.isAssignableFrom(beanClass)) {
                return false;
            }
        }

        return true;
    }

    @Override
    public boolean equals(RejectBeanClassDefinition other) {
        return Objects.equals(rejectClass, other.rejectClass) && Objects.equals(exceptClasses, other.exceptClasses);
    }

    @Override
    public int hashCode() {
        return Objects.hash(rejectClass, exceptClasses);
    }
}

@@ -529,23 +529,21 @@
         
-assert 
+this.
 rejectCl
@@ -550,82 +550,33 @@
 ass 
-!
 = 
-null;%0A        assert exceptClasses != null;%0A        this.rejectClass = 
+Objects.requireNonNull(
 reje
@@ -578,24 +578,25 @@
 (rejectClass
+)
 ;%0A        th
@@ -614,16 +614,39 @@
 asses = 
+Objects.requireNonNull(
 exceptCl
@@ -650,18 +650,20 @@
 tClasses
+)
 ;%0A
+%0A
     %7D%0A%0A 
@@ -738,32 +738,32 @@
 ?%3E beanClass) %7B%0A
-
         if (!rej
@@ -758,16 +758,37 @@
     if (
+beanClass == null %7C%7C 
 !rejectC

Fix minor issue in RejectBeanClassDefinition