};
env.addActiveProfile("validProfile"); // succeeds
try {
env.addActiveProfile("invalid-profile");
fail("expected validation exception");
}
catch (IllegalArgumentException ex) {
assertThat(ex.getMessage(),
equalTo("Invalid profile [invalid-profile]: must not contain dash character"));