@Test
public void testAgentConfigInvalidCheckInterval() throws Exception {

  temporarySystemProperties.set(Configuration.Property.CHECK_INTERVAL.getQualifiedName()).to("4");
  Agent.initAgent(null, logger);
  verify(logger).error(argThat(is("JavaMemoryAssistant cannot start")),
      argThat(allOf(isA(IllegalArgumentException.class),
          hasMessageThat(is("The value '4' is invalid for the 'jma.check_interval' property: "
              + "it must follow the Java pattern '(\\d*\\.?\\d*\\d)(ms|s|m|h)'")))));
  verifyNoMoreInteractions(logger);
}