class ShouldHaveAnchor extends BasicErrorMessageFactory {

  private static final String SHOULD_HAVE_ANCHOR = "%nExpecting anchor of%n  <%s>%nto be:%n  <%s>%nbut was:%n  <%s>";
  private static final String SHOULD_NOT_HAVE_ANCHOR = "%nExpecting actual:%n  <%s>%nnot to have an anchor but had:%n  <%s>";

  public static ErrorMessageFactory shouldHaveAnchor(URL actual, String expectedAnchor) {<FILL_FUNCTION_BODY>}

  private ShouldHaveAnchor(URL actual, String expectedAnchor) {
    super(SHOULD_HAVE_ANCHOR, actual, expectedAnchor, actual.getRef());
  }

  private ShouldHaveAnchor(URL actual) {
    super(SHOULD_NOT_HAVE_ANCHOR, actual, actual.getRef());
  }

}

    return expectedAnchor == null ? new ShouldHaveAnchor(actual) : new ShouldHaveAnchor(actual, expectedAnchor);
  
<methods>public transient void <init>(java.lang.String, java.lang.Object[]) ,public java.lang.String create(org.assertj.core.description.Description, org.assertj.core.presentation.Representation) ,public java.lang.String create(org.assertj.core.description.Description) ,public java.lang.String create() ,public boolean equals(java.lang.Object) ,public int hashCode() ,public java.lang.String toString() <variables>protected final non-sealed java.lang.Object[] arguments,protected final non-sealed java.lang.String format,org.assertj.core.error.MessageFormatter formatter