class ShouldHaveParent extends BasicErrorMessageFactory {

  @VisibleForTesting
  public static final String PATH_NO_PARENT = "%nExpecting path%n  %s%nto have parent:%n  %s%nbut did not have one.";

  @VisibleForTesting
  public static final String PATH_NOT_EXPECTED_PARENT = "%nExpecting path%n  %s%nto have parent:%n  %s%nbut had:%n  %s.";

  @VisibleForTesting
  public static final String FILE_NO_PARENT = "%nExpecting file%n  %s%nto have parent:%n  %s%nbut did not have one.";

  @VisibleForTesting
  public static final String FILE_NOT_EXPECTED_PARENT = "%nExpecting file%n  %s%nto have parent:%n  %s%nbut had:%n  %s.";

  public static ShouldHaveParent shouldHaveParent(File actual, File expected) {
    return actual.getParentFile() == null ? new ShouldHaveParent(actual, expected)
        : new ShouldHaveParent(actual,
                               actual.getParentFile(), expected);
  }

  public static ShouldHaveParent shouldHaveParent(Path actual, Path expected) {<FILL_FUNCTION_BODY>}

  public static ShouldHaveParent shouldHaveParent(Path actual, Path actualParent, Path expected) {
    return new ShouldHaveParent(actual, actualParent, expected);
  }

  private ShouldHaveParent(File actual, File expected) {
    super(FILE_NO_PARENT, actual, expected);
  }

  private ShouldHaveParent(File actual, File actualParent, File expected) {
    super(FILE_NOT_EXPECTED_PARENT, actual, expected, actualParent);
  }

  private ShouldHaveParent(Path actual, Path expected) {
    super(PATH_NO_PARENT, actual, expected);
  }

  private ShouldHaveParent(Path actual, Path actualParent, Path expected) {
    super(PATH_NOT_EXPECTED_PARENT, actual, expected, actualParent);
  }
}

    final Path actualParent = actual.getParent();
    return actualParent == null
        ? new ShouldHaveParent(actual, expected)
        : new ShouldHaveParent(actual, actualParent, expected);
  
<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