    @Test(expected = AbortProcessingException.class)
    public void verify_whenTypeElementIsPackagePrivate_shouldAbortWithError() {

        Set<Modifier> modSet = new HashSet<>();
        modSet.add(Modifier.PROTECTED);
        Messager messager = mock(Messager.class);
        Elements element = mock(Elements.class);
        Types types = mock(Types.class);
        AnnotationVerifier verifier = new AnnotationVerifier(messager, element, types);
        PackageElement packageElement = mock(PackageElement.class);
        Name name = mock(Name.class);
        when(packageElement.getQualifiedName()).thenReturn(name);
        when(name.toString()).thenReturn("Nonmatching.package");
        TypeElement typeElement = mock(TypeElement.class);
        when(typeElement.getModifiers()).thenReturn(modSet);
        when(typeElement.getEnclosingElement()).thenReturn(packageElement);
        verifier.verify(typeElement);
        verify(messager).printMessage(eq(Diagnostic.Kind.ERROR), anyString(), eq(typeElement));
    }