private void checkBackendBehaviour(Backend backend) { try { WorkerBuildContext context = EasyMock.createNiceMock( WorkerBuildContext.class ); IndexManager indexManager = EasyMock.createNiceMock( IndexManager.class ); backend.initialize( new Properties(), context ); BackendQueueProcessor processor = backend.createQueueProcessor( indexManager, context ); processor.applyWork( null, null ); } catch (IllegalArgumentException e) { // this is ok, we just want to avoid other exceptions or NPEs } } }
backend.initialize( properties, buildContext );
backend.initialize( properties, buildContext );