@Test(expectedExceptions = RuntimeException.class,
        expectedExceptionsMessageRegExp = ".*getString\\(\\) cannot have both @HealthCheck and @HealthCheckRestartDesired annotations")
public void testMethodRegularAndRestartAnnotations()
{

    HealthBean.forTarget(new Object() {
        @HealthCheck("Name 1")
        @HealthCheckRestartDesired("Name 2")
        public String getString()
        {
            return null;
        }
    });
}