@Test public void testGetMatchOutcome() { VelocityLayoutCondition condition = new VelocityLayoutCondition(); MockEnvironment environment = new MockEnvironment(); MockConditionContext conditionContext = new MockConditionContext(); conditionContext.setEnvironment(environment); ConditionOutcome conditionOutcome = condition.getMatchOutcome(conditionContext, null); Assert.assertTrue(conditionOutcome.isMatch()); environment.setProperty("spring.velocity.enabled", "true"); environment.setProperty("spring.velocity.layout-enabled", "true"); conditionOutcome = condition.getMatchOutcome(conditionContext, null); Assert.assertTrue(conditionOutcome.isMatch()); environment.setProperty("spring.velocity.enabled", "false"); conditionOutcome = condition.getMatchOutcome(conditionContext, null); Assert.assertFalse(conditionOutcome.isMatch()); environment.setProperty("spring.velocity.enabled", "true"); environment.setProperty("spring.velocity.layout-enabled", "false"); conditionOutcome = condition.getMatchOutcome(conditionContext, null); Assert.assertFalse(conditionOutcome.isMatch()); }
@Override public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { Environment environment = context.getEnvironment(); return getMatchOutcome(environment); }
VelocityLayoutCondition extends SpringBootCondition { @Override public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { Environment environment = context.getEnvironment(); return getMatchOutcome(environment); } }
VelocityLayoutCondition extends SpringBootCondition { @Override public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { Environment environment = context.getEnvironment(); return getMatchOutcome(environment); }  }
VelocityLayoutCondition extends SpringBootCondition { @Override public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { Environment environment = context.getEnvironment(); return getMatchOutcome(environment); }  @Override ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata); }
VelocityLayoutCondition extends SpringBootCondition { @Override public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { Environment environment = context.getEnvironment(); return getMatchOutcome(environment); }  @Override ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata);  }