Injector injector = Guice.createInjector(new AbstractModule() {
@Override
protected void configure() {
bind(String.class).annotatedWith(ApiVersion.class).toInstance("0.10.8");
}
}, new ChefParserModule(), new GsonModule());
ParseCookbookVersionsCheckingChefVersion parser = injector
.getInstance(ParseCookbookVersionsCheckingChefVersion.class);
assertTrue(parser.parser instanceof ParseCookbookVersionsV10FromJson);
}