How to use SearchResponse.searchResponseOf() and Hit.of() for Java client?

I’m new to the OpenSearch Java library and I’m struggling to find an example online of how to use the static methods SearchResponse.searchResponseOf() and Hit.of(). I’m trying to use these methods to create test objects for my unit tests and I’m not really sure how to use these. Could someone provide me an example of how to create these types of objects? These are the method signatures for the respective classes:

public static SearchResponse searchResponseOf(
Function<Builder, ObjectBuilder<SearchResponse>> fn) {
return fn.apply(new Builder<>()).build();
}

public static Hit of(Function<Builder, ObjectBuilder<Hit>> fn) {
return fn.apply(new Builder<>()).build();
}

Hi,
did you find a solution for this?

Regards
Murk