### Question:
LiteralAppVersionStrategy extends AbstractAppVersionStrategy { @Override public boolean canHandle(String[] args) { return args != null && args.length == 2 && recognizes(args[0]); } LiteralAppVersionStrategy(); @Override String resolveAppVersion(Collection<File> codeBases, String[] args); @Override boolean canHandle(String[] args);  }### Answer:
@Test public void should_not_handle_unknown_strategy_name() { String args[] = {"foobar", "slf4j-api-(.*).jar"}; assertThat(strategy.canHandle(args), is(false)); }
@Test public void should_not_handle_when_missing_pattern() { String args[] = {"literal"}; assertThat(strategy.canHandle(args), is(false)); }
@Test public void should_not_handle_too_many_patterns() { String args[] = {"literal", "value1", "value2"}; assertThat(strategy.canHandle(args), is(false)); }
@Test public void should_handle_one_pattern() { String args[] = {"literal", "value"}; assertThat(strategy.canHandle(args), is(true)); }