class MyTestClass { /* Load and parse YAML resource */ @Rule public YamlResource<Person> spongeBob = givenResource() .yaml("/com/adelean/junit/jupiter/sponge-bob.yaml") .parseWith(new Yaml()); /* Load and parse YAML documents resource */ @Rule public YamlDocumentsResource<Log[]> logsAsArray = givenResource() .yamlDocuments("/com/adelean/junit/jupiter/logs.yml") .parseWith(new Yaml(new Constructor(Log.class))); }