}
private static class ConsumerResourceVirtEntitlementModule extends AbstractModule {
@Override
protected void configure() {
Configuration config = mock(Configuration.class);
when(config.getBoolean(ConfigProperties.STANDALONE)).thenReturn(false);
when(config.getString(eq(ConfigProperties.CONSUMER_FACTS_MATCHER)))
.thenReturn("^virt.*");
when(config.getString(eq(ConfigProperties.CONSUMER_SYSTEM_NAME_PATTERN)))
.thenReturn("[\\#\\?\\'\\`\\!@{}()\\[\\]\\?&\\w-\\.]+");
when(config.getString(eq(ConfigProperties.CONSUMER_PERSON_NAME_PATTERN)))
.thenReturn("[\\#\\?\\'\\`\\!@{}()\\[\\]\\?&\\w-\\.]+");
bind(Configuration.class).toInstance(config);
bind(Enforcer.class).to(EntitlementRules.class);
}