ClassPathModifier implements Option { public static ClassPathModifier forCygwin() { return new CygwinModifier(true); } ClassPathModifier(boolean useQuotes); String modify(String classPath); String applyQuotes(String classPath); @OptionsByType.Default static ClassPathModifier none(); static ClassPathModifier forCygwin(); static ClassPathModifier forWindows(); static ClassPathModifier forWindowsWithQuotes();  }
@Test public void shouldFindCygwinOption() throws Exception { ClassPathModifier cygwin = ClassPathModifier.forCygwin(); OptionsByType optionsByType = OptionsByType.of(cygwin); ClassPathModifier modifier = optionsByType.get(ClassPathModifier.class); assertThat(modifier, is(sameInstance(cygwin))); }