diff --git a/libraries-2/src/test/java/com/baeldung/handlebars/CustomHelperUnitTest.java b/libraries-2/src/test/java/com/baeldung/handlebars/CustomHelperUnitTest.java index 18f02fe013..6966d69cef 100644 --- a/libraries-2/src/test/java/com/baeldung/handlebars/CustomHelperUnitTest.java +++ b/libraries-2/src/test/java/com/baeldung/handlebars/CustomHelperUnitTest.java @@ -23,7 +23,7 @@ public class CustomHelperUnitTest { @Test public void whenHelperIsCreated_ThenCanRegister() throws IOException { Handlebars handlebars = new Handlebars(templateLoader); - handlebars.registerHelper("person", new Helper() { + handlebars.registerHelper("isBusy", new Helper() { @Override public Object apply(Person context, Options options) throws IOException { String busyString = context.isBusy() ? "busy" : "available"; diff --git a/libraries-2/src/test/java/com/baeldung/handlebars/HelperSource.java b/libraries-2/src/test/java/com/baeldung/handlebars/HelperSource.java index 2b7d705af9..b98786c029 100644 --- a/libraries-2/src/test/java/com/baeldung/handlebars/HelperSource.java +++ b/libraries-2/src/test/java/com/baeldung/handlebars/HelperSource.java @@ -2,7 +2,7 @@ package com.baeldung.handlebars; public class HelperSource { - public String person(Person context) { + public String isBusy(Person context) { String busyString = context.isBusy() ? "busy" : "available"; return context.getName() + " - " + busyString; } diff --git a/libraries-2/src/test/resources/handlebars/person.html b/libraries-2/src/test/resources/handlebars/person.html index 5207d49266..9df7850f60 100644 --- a/libraries-2/src/test/resources/handlebars/person.html +++ b/libraries-2/src/test/resources/handlebars/person.html @@ -1 +1 @@ -{{#person this}}{{/person}} \ No newline at end of file +{{#isBusy this}}{{/isBusy}} \ No newline at end of file