From fd0213cdd430440e3e69aa7414511f2441e234cf Mon Sep 17 00:00:00 2001 From: Jeffrey Phillips Freeman <jeffrey.freeman@syncleus.com> Date: Sun, 1 Oct 2017 14:37:17 -0400 Subject: [PATCH] fix: fixed a bug in one of the unit tests. --- .../annotation/AbstractAnnotationFrameFactory.java | 2 +- .../framefactories/annotation/AnnotationFrameFactoryTest.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/syncleus/ferma/framefactories/annotation/AbstractAnnotationFrameFactory.java b/src/main/java/com/syncleus/ferma/framefactories/annotation/AbstractAnnotationFrameFactory.java index 61071199..88bbaa56 100644 --- a/src/main/java/com/syncleus/ferma/framefactories/annotation/AbstractAnnotationFrameFactory.java +++ b/src/main/java/com/syncleus/ferma/framefactories/annotation/AbstractAnnotationFrameFactory.java @@ -39,7 +39,7 @@ public class AbstractAnnotationFrameFactory implements FrameFactory { private final ReflectionCache reflectionCache; private final Map<Class, Class> constructedClassCache = new HashMap<>(); - public AbstractAnnotationFrameFactory(final ReflectionCache reflectionCache, Set<MethodHandler> handlers) { + protected AbstractAnnotationFrameFactory(final ReflectionCache reflectionCache, Set<MethodHandler> handlers) { this.reflectionCache = reflectionCache; for(MethodHandler handler : handlers) this.methodHandlers.put(handler.getAnnotationType(), handler); diff --git a/src/test/java/com/syncleus/ferma/framefactories/annotation/AnnotationFrameFactoryTest.java b/src/test/java/com/syncleus/ferma/framefactories/annotation/AnnotationFrameFactoryTest.java index 736899f5..8e3c0d4a 100644 --- a/src/test/java/com/syncleus/ferma/framefactories/annotation/AnnotationFrameFactoryTest.java +++ b/src/test/java/com/syncleus/ferma/framefactories/annotation/AnnotationFrameFactoryTest.java @@ -85,7 +85,8 @@ public class AnnotationFrameFactoryTest { .when(custom.processMethod(Mockito.any(), Mockito.any(), Mockito.any())) .thenAnswer(inv -> inv.getArgumentAt(0, DynamicType.Builder.class)) .getMock(); - AnnotationFrameFactory frameFactory = new AnnotationFrameFactory(new ReflectionCache(), Collections.singleton(custom)); + AbstractAnnotationFrameFactory frameFactory = new AbstractAnnotationFrameFactory(new ReflectionCache(), Collections.singleton(custom)) { + }; DelegatingFramedGraph framedGraph = new DelegatingFramedGraph(fg.getBaseGraph(), frameFactory, new PolymorphicTypeResolver()); framedGraph.addFramedVertex(God.class); Mockito.verify(custom, Mockito.atLeast(0)).getAnnotationType(); -- GitLab