@Autowired
protected TestRestTemplate restTemplate;
+ // Because I put the annotations on this parent class,
+ // must define at least one test here.
+ @Test
+ public void beQuietSonar() {
+ // Silence Sonar warning about missing assertion.
+ Assertions.assertTrue(logger.isWarnEnabled());
+ }
+
/**
- * Flexible URI builder.
+ * Builds URI from path components and query parameters.
*
* @param queryParams
* Map of string-string query parameters
* @param path
* Array of path components. If a component has an
- * embedded slash, the string is split and each
+ * embedded slash, that string is split and each
* subcomponent is added individually.
* @return URI
*/
return builder.build().encode().toUri();
}
- // Because I put the annotations on this parent class,
- // must define at least one test here.
- @Test
- public void contextLoads() {
- // Silence Sonar warning about missing assertion.
- Assertions.assertTrue(logger.isWarnEnabled());
- logger.info("Context loads on mock profile");
- }
-
- public TestRestTemplate testRestTemplateAdminRole() {
+ protected TestRestTemplate testRestTemplateAdminRole() {
return restTemplate.withBasicAuth(WebSecurityMockConfiguration.TEST_CRED_ADMIN,
WebSecurityMockConfiguration.TEST_CRED_ADMIN);
}
- public TestRestTemplate testRestTemplateStandardRole() {
+ protected TestRestTemplate testRestTemplateStandardRole() {
return restTemplate.withBasicAuth(WebSecurityMockConfiguration.TEST_CRED_STANDARD,
WebSecurityMockConfiguration.TEST_CRED_STANDARD);
}