Annotation Interface VisibleForTesting


@Documented @Target({TYPE,CONSTRUCTOR,METHOD,FIELD}) public @interface VisibleForTesting
Annotates a program element that exists, or is more widely visible than otherwise necessary, only for use in test code.

Introduced while mobbing with Michael Feathers. Name and javadoc borrowed from Guava and AssertJ (both are Apache License 2.0).

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Optional description
  • Element Details

    • value

      String value
      Optional description
      Returns:
      the description for this annotation
      Default:
      ""