@Before public void setUp() throws Exception { PropertyConfigurator.configure(Utils.loadProperties(CONFIGS_TESTING_PROPERTIES)); this.properties = Utils.loadProperties(CONFIGS_TESTING_PROPERTIES); injector = Guice.createInjector( new LogModule(properties), new SecurityModule(), new DatamodelImplModule(), new TestModule(), new AbstractModule() { @Override protected void configure() { Names.bindProperties(binder(), properties); bind(NetInfNodeConnection.class) .annotatedWith(SecurityModule.Security.class) .to(RemoteNodeConnection.class); } }); this.messageReceiver = this.injector.getInstance(MessageReceiver.class); this.messageProcessor = this.injector.getInstance(MessageProcessorImp.class); this.dmFactory = this.injector.getInstance(DatamodelFactory.class); this.provider = this.injector.getProvider(Communicator.class); // this.mockErrorProvider = this.injector.getProvider(MockErrorCommunicator.class); this.messageQueue = new LinkedBlockingQueue<ESFEventMessage>(); esfConnector = new AbstractEsfConnectorImp(dmFactory, messageReceiver, messageProcessor, host, port); }
@Override public void setPublicMasterKey(PublicKey publicKey) { resetAttribute( DefinedAttributeIdentification.PUBLIC_KEY.getURI(), Utils.objectToString(publicKey), DefinedAttributePurpose.SYSTEM_ATTRIBUTE.getAttributePurpose()); }
public ChunkBothCacheModule() { super(Utils.loadProperties(NODE_PROPERTIES)); }
public MDHT12Module() { super(Utils.loadProperties(NODE_PROPERTIES)); }
@Override public PublicKey getPublicMasterKey() { return Utils.stringToPublicKey( getSingleAttribute(DefinedAttributeIdentification.PUBLIC_KEY.getURI()) .getValue(String.class)); }