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