@Test public void shouldRequireValidPatternInConfiguration() { try { RegexExtractorInterceptorMillisSerializer fixture = new RegexExtractorInterceptorMillisSerializer(); Context context = new Context(); context.put("pattern", "ABCDEFG"); fixture.configure(context); Assert.fail(); } catch (IllegalArgumentException ex) { } }
@Override public void configure(Context context) { String pattern = context.getString("pattern"); Preconditions.checkArgument(!StringUtils.isEmpty(pattern), "Must configure with a valid pattern"); formatter = DateTimeFormat.forPattern(pattern); }
RegexExtractorInterceptorMillisSerializer implements
    RegexExtractorInterceptorSerializer { @Override public void configure(Context context) { String pattern = context.getString("pattern"); Preconditions.checkArgument(!StringUtils.isEmpty(pattern), "Must configure with a valid pattern"); formatter = DateTimeFormat.forPattern(pattern); } }
RegexExtractorInterceptorMillisSerializer implements
    RegexExtractorInterceptorSerializer { @Override public void configure(Context context) { String pattern = context.getString("pattern"); Preconditions.checkArgument(!StringUtils.isEmpty(pattern), "Must configure with a valid pattern"); formatter = DateTimeFormat.forPattern(pattern); }  }
RegexExtractorInterceptorMillisSerializer implements
    RegexExtractorInterceptorSerializer { @Override public void configure(Context context) { String pattern = context.getString("pattern"); Preconditions.checkArgument(!StringUtils.isEmpty(pattern), "Must configure with a valid pattern"); formatter = DateTimeFormat.forPattern(pattern); }  @Override void configure(Context context); @Override String serialize(String value); @Override void configure(ComponentConfiguration conf); }
RegexExtractorInterceptorMillisSerializer implements
    RegexExtractorInterceptorSerializer { @Override public void configure(Context context) { String pattern = context.getString("pattern"); Preconditions.checkArgument(!StringUtils.isEmpty(pattern), "Must configure with a valid pattern"); formatter = DateTimeFormat.forPattern(pattern); }  @Override void configure(Context context); @Override String serialize(String value); @Override void configure(ComponentConfiguration conf);  }