// *
Assert.assertNotNull(settings.getGlobalRestApiSettings());
// enable it, not that even the baseUrl is not set, it will be filled with a defaut one
RestApiSettings restApiSettings = new RestApiSettings();
settings.setGlobalRestApiSettings(restApiSettings);
SettingsMessageUtil.save(settings);
settings = SettingsMessageUtil.getCurrentSettings();
Assert.assertNotNull(settings.getGlobalRestApiSettings());
Assert.assertTrue(StringUtils.isNotEmpty(settings.getGlobalRestApiSettings().getBaseUrl()));
Assert.assertEquals(settings.getGlobalRestApiSettings().isForceBaseUrl(), false);
// now edit it
restApiSettings.setBaseUrl("http://myhost/nexus");
restApiSettings.setForceBaseUrl(true);
settings.setGlobalRestApiSettings(restApiSettings);
SettingsMessageUtil.save(settings);
settings = SettingsMessageUtil.getCurrentSettings();
Assert.assertNotNull(settings.getGlobalRestApiSettings());