@@ -85,8 +85,10 @@ void testProvisioningExample() throws Exception {
8585
8686 // validate repoinit statements
8787 config = readConfig ("org.apache.sling.jcr.repoinit.RepositoryInitializer-test.cfg.json" );
88- assertArrayEquals (new String [] {"create path /repoinit/test1\n " +
89- "create path /repoinit/test2\n " }, (String [])config .get ("scripts" ));
88+ assertArrayEquals (new String [] { """
89+ create path /repoinit/test1
90+ create path /repoinit/test2
91+ """ }, (String [])config .get ("scripts" ));
9092
9193 config = readConfig ("mode1/org.apache.sling.jcr.repoinit.RepositoryInitializer-test-mode1.cfg.json" );
9294 assertArrayEquals (new String [] { "create service user mode1\n " }, (String [])config .get ("scripts" ));
@@ -97,11 +99,13 @@ void testProvisioningExample() throws Exception {
9799
98100 @ Test
99101 void testSimpleConfig () throws Exception {
100- final String PROVISIONING_FILE = "[feature name=test]\n " +
101- "[configurations]\n " +
102- "com.example.ServiceConfiguration\n "
103- + " bar=\" bar\" "
104- + " foo=\" foo\" " ;
102+ final String PROVISIONING_FILE = """
103+ [feature name=test]
104+ [configurations]
105+ com.example.ServiceConfiguration
106+ bar="bar"
107+ foo="foo"
108+ """ ;
105109
106110 // post process provisioning example
107111 File provisioningFile = new File (targetDir , "simpleConfig.txt" );
@@ -116,11 +120,12 @@ void testSimpleConfig() throws Exception {
116120
117121 @ Test
118122 void testSimpleConfigWithNewline () throws Exception {
119- final String PROVISIONING_FILE = "[feature name=test]\n " +
120- "[configurations]\n " +
121- "com.example.ServiceConfiguration\n "
122- + ""
123- + " foo=\" foo\" " ;
123+ final String PROVISIONING_FILE = """
124+ [feature name=test]
125+ [configurations]
126+ com.example.ServiceConfiguration
127+ foo="foo"
128+ """ ;
124129
125130 // post process provisioning example
126131 File provisioningFile = new File (targetDir , "simpleConfigWithNewline.txt" );
0 commit comments