@Test
public void testAgentConfigInvalidLogLevel() throws Exception {

  temporarySystemProperties.set(Configuration.Property.LOG_LEVEL.getQualifiedName()).to("YOLO");
  Agent.initAgent(null, logger);
  verify(logger).error(argThat(is("JavaMemoryAssistant cannot start")),
      argThat(allOf(isA(IllegalArgumentException.class),
          hasMessageThat(is("The value 'YOLO' is invalid for the 'jma.log_level' property: "
              + "allowed values are: OFF, ERROR, INFO, WARNING, DEBUG")))));
  verifyNoMoreInteractions(logger);
}