title: Can I check for usage of lombok.experimental.* annotations with ArchUnit?"
body: <p>As the question suggests, how can I check for certain imports with archUnit.</p>
  <p>So I want the test to fail, when the tested class itself imports lombok.experimental.*.</p>
  <p>I understand how to check for packages and stuff like that, but the approach doesnt seem to work for imports. Any suggestions?</p>
  <p>My Code:</p>
  <pre><code>package com.nikita.Nikitos;
  
  import static org.junit.Assert.assertTrue;
  
  import org.junit.Test;
  import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noClasses;
  import com.tngtech.archunit.core.domain.JavaClasses;
  import com.tngtech.archunit.core.importer.ClassFileImporter;
  
  public class AppTest
  {
      @Test
      public void keineKlassenAusLombokExperimental() {
  
          JavaClasses classes = new ClassFileImporter()
                  .importPackages(&quot;com.nikita..&quot;);
  
          noClasses().should().dependOnClassesThat()
          .resideInAPackage(&quot;lombok.experimental..&quot;).check(classes);
  
      }
  
  }
  </code></pre>
  <p>The class that I want to test:</p>
  <pre><code>package com.nikita.Nikitos;
  
  import lombok.experimental.UtilityClass;
  
  @UtilityClass
  public class App
  {
  static int hd;
  }
  </code></pre>