@@ -148,6 +148,7 @@
3.1.1
2.22.1
1.3.2
+ 4.12
diff --git a/libraries-2/README.md b/libraries-2/README.md
index 95c454edbb..eb45a3e426 100644
--- a/libraries-2/README.md
+++ b/libraries-2/README.md
@@ -18,7 +18,7 @@ Remember, for advanced libraries like [Jackson](/jackson) and [JUnit](/testing-m
- [Key Value Store with Chronicle Map](https://www.baeldung.com/java-chronicle-map)
- [Guide to MapDB](https://www.baeldung.com/mapdb)
- [A Guide to Apache Mesos](https://www.baeldung.com/apache-mesos)
-- [JasperReports with Spring](https://www.baeldung.com/spring-jasper)]
+- [JasperReports with Spring](https://www.baeldung.com/spring-jasper)
- [Jetty ReactiveStreams HTTP Client](https://www.baeldung.com/jetty-reactivestreams-http-client)
- More articles [[<-- prev]](/libraries)
diff --git a/libraries-2/src/test/java/com/baeldung/handlebars/BuiltinHelperUnitTest.java b/libraries-2/src/test/java/com/baeldung/handlebars/BuiltinHelperUnitTest.java
index aa29e4c441..357bb7df89 100644
--- a/libraries-2/src/test/java/com/baeldung/handlebars/BuiltinHelperUnitTest.java
+++ b/libraries-2/src/test/java/com/baeldung/handlebars/BuiltinHelperUnitTest.java
@@ -1,15 +1,14 @@
package com.baeldung.handlebars;
-import static org.assertj.core.api.Assertions.assertThat;
-
import com.github.jknack.handlebars.Handlebars;
import com.github.jknack.handlebars.Template;
import com.github.jknack.handlebars.io.ClassPathTemplateLoader;
import com.github.jknack.handlebars.io.TemplateLoader;
+import org.junit.Test;
+
import java.io.IOException;
-import org.junit.Ignore;
-import org.junit.Test;
+import static org.assertj.core.api.Assertions.assertThat;
/**
* Showcases the built-in template helpers.
@@ -20,7 +19,6 @@ public class BuiltinHelperUnitTest {
private TemplateLoader templateLoader = new ClassPathTemplateLoader("/handlebars", ".html");
- @Ignore
@Test
public void whenUsedWith_ThenContextChanges() throws IOException {
Handlebars handlebars = new Handlebars(templateLoader);
@@ -30,10 +28,9 @@ public class BuiltinHelperUnitTest {
String templateString = template.apply(person);
- assertThat(templateString).isEqualTo("\nI live in World
\n");
+ assertThat(templateString).contains("I live in World
");
}
- @Ignore
@Test
public void whenUsedWithMustacheStyle_ThenContextChanges() throws IOException {
Handlebars handlebars = new Handlebars(templateLoader);
@@ -43,10 +40,9 @@ public class BuiltinHelperUnitTest {
String templateString = template.apply(person);
- assertThat(templateString).isEqualTo("\nI live in World
\n");
+ assertThat(templateString).contains("I live in World
");
}
- @Ignore
@Test
public void whenUsedEach_ThenIterates() throws IOException {
Handlebars handlebars = new Handlebars(templateLoader);
@@ -59,11 +55,10 @@ public class BuiltinHelperUnitTest {
String templateString = template.apply(person);
- assertThat(templateString).isEqualTo("\nJava is my friend.\n"
- + "\nSpring is my friend.\n");
+ assertThat(templateString)
+ .contains("Java is my friend.", "Spring is my friend.");
}
- @Ignore
@Test
public void whenUsedEachMustacheStyle_ThenIterates() throws IOException {
Handlebars handlebars = new Handlebars(templateLoader);
@@ -76,11 +71,10 @@ public class BuiltinHelperUnitTest {
String templateString = template.apply(person);
- assertThat(templateString).isEqualTo("\nJava is my friend.\n"
- + "\nSpring is my friend.\n");
+ assertThat(templateString)
+ .contains("Java is my friend.", "Spring is my friend.");
}
- @Ignore
@Test
public void whenUsedIf_ThenPutsCondition() throws IOException {
Handlebars handlebars = new Handlebars(templateLoader);
@@ -90,10 +84,9 @@ public class BuiltinHelperUnitTest {
String templateString = template.apply(person);
- assertThat(templateString).isEqualTo("\nBaeldung is busy.
\n");
+ assertThat(templateString).contains("Baeldung is busy.
");
}
- @Ignore
@Test
public void whenUsedIfMustacheStyle_ThenPutsCondition() throws IOException {
Handlebars handlebars = new Handlebars(templateLoader);
@@ -103,7 +96,7 @@ public class BuiltinHelperUnitTest {
String templateString = template.apply(person);
- assertThat(templateString).isEqualTo("\nBaeldung is busy.
\n");
+ assertThat(templateString).contains("Baeldung is busy.
");
}
private Person getPerson(String name) {
diff --git a/libraries-2/src/test/java/com/baeldung/handlebars/ReusingTemplatesUnitTest.java b/libraries-2/src/test/java/com/baeldung/handlebars/ReusingTemplatesUnitTest.java
index 56449f59e4..376e44e4bd 100644
--- a/libraries-2/src/test/java/com/baeldung/handlebars/ReusingTemplatesUnitTest.java
+++ b/libraries-2/src/test/java/com/baeldung/handlebars/ReusingTemplatesUnitTest.java
@@ -1,15 +1,14 @@
package com.baeldung.handlebars;
-import static org.assertj.core.api.Assertions.assertThat;
-
import com.github.jknack.handlebars.Handlebars;
import com.github.jknack.handlebars.Template;
import com.github.jknack.handlebars.io.ClassPathTemplateLoader;
import com.github.jknack.handlebars.io.TemplateLoader;
+import org.junit.Test;
+
import java.io.IOException;
-import org.junit.Ignore;
-import org.junit.Test;
+import static org.assertj.core.api.Assertions.assertThat;
/**
* Showcases reusing the existing templates.
@@ -20,7 +19,6 @@ public class ReusingTemplatesUnitTest {
private TemplateLoader templateLoader = new ClassPathTemplateLoader("/handlebars", ".html");
- @Ignore
@Test
public void whenOtherTemplateIsReferenced_ThenCanReuse() throws IOException {
Handlebars handlebars = new Handlebars(templateLoader);
@@ -30,10 +28,10 @@ public class ReusingTemplatesUnitTest {
String templateString = template.apply(person);
- assertThat(templateString).isEqualTo("Hi Baeldung!
\nThis is the page Baeldung
");
+ assertThat(templateString)
+ .contains("Hi Baeldung!
", "This is the page Baeldung
");
}
- @Ignore
@Test
public void whenBlockIsDefined_ThenCanOverrideWithPartial() throws IOException {
Handlebars handlebars = new Handlebars(templateLoader);
@@ -43,11 +41,11 @@ public class ReusingTemplatesUnitTest {
String templateString = template.apply(person);
- assertThat(templateString).isEqualTo("\n\n"
- + "\n"
- + "\n This is the intro\n\n"
- + "\n Hi there!\n\n"
- + "\n"
- + "");
+ assertThat(templateString).contains("",
+ "",
+ "This is the intro",
+ "Hi there!",
+ "",
+ "");
}
}
diff --git a/libraries-3/README.md b/libraries-3/README.md
index a9d48bb389..404045e6b1 100644
--- a/libraries-3/README.md
+++ b/libraries-3/README.md
@@ -9,3 +9,6 @@ Remember, for advanced libraries like [Jackson](/jackson) and [JUnit](/testing-m
### Relevant Articles:
- [Parsing Command-Line Parameters with JCommander](https://www.baeldung.com/jcommander-parsing-command-line-parameters)
+- [Guide to the Cactoos Library](https://www.baeldung.com/java-cactoos)
+- [Parsing Command-Line Parameters with Airline](https://www.baeldung.com/java-airline)
+- [Introduction to cache2k](https://www.baeldung.com/java-cache2k)
diff --git a/libraries-3/pom.xml b/libraries-3/pom.xml
index 5a73e19b19..a438d423e2 100644
--- a/libraries-3/pom.xml
+++ b/libraries-3/pom.xml
@@ -24,7 +24,6 @@
lombok
${lombok.version}
-