@PrepareForTest({ EvaluationContextFactory.class, FactoryFinder.class }) @Test(expected = FactoryException.class) public void testNegTestEngine() throws FactoryException { PowerMockito.mockStatic(FactoryFinder.class); PowerMockito.when(FactoryFinder.find(Mockito.any(), Mockito.any(), Mockito.any())).thenReturn(null); final OnapPdpEngineFactory factory = new OnapPdpEngineFactory(); factory.newEngine(); fail("Expecting an exception."); }
@Override public PDPEngine newEngine() throws FactoryException { final EvaluationContextFactory evaluationContextFactory = EvaluationContextFactory.newInstance(); if (evaluationContextFactory == null) { this.logger.error("Null EvaluationContextFactory"); throw new FactoryException("Null EvaluationContextFactory"); } return new OnapPdpEngine(evaluationContextFactory, this.getDefaultBehavior(), this.getScopeResolver()); }
OnapPdpEngineFactory extends PDPEngineFactory { @Override public PDPEngine newEngine() throws FactoryException { final EvaluationContextFactory evaluationContextFactory = EvaluationContextFactory.newInstance(); if (evaluationContextFactory == null) { this.logger.error("Null EvaluationContextFactory"); throw new FactoryException("Null EvaluationContextFactory"); } return new OnapPdpEngine(evaluationContextFactory, this.getDefaultBehavior(), this.getScopeResolver()); } }
OnapPdpEngineFactory extends PDPEngineFactory { @Override public PDPEngine newEngine() throws FactoryException { final EvaluationContextFactory evaluationContextFactory = EvaluationContextFactory.newInstance(); if (evaluationContextFactory == null) { this.logger.error("Null EvaluationContextFactory"); throw new FactoryException("Null EvaluationContextFactory"); } return new OnapPdpEngine(evaluationContextFactory, this.getDefaultBehavior(), this.getScopeResolver()); }  }
OnapPdpEngineFactory extends PDPEngineFactory { @Override public PDPEngine newEngine() throws FactoryException { final EvaluationContextFactory evaluationContextFactory = EvaluationContextFactory.newInstance(); if (evaluationContextFactory == null) { this.logger.error("Null EvaluationContextFactory"); throw new FactoryException("Null EvaluationContextFactory"); } return new OnapPdpEngine(evaluationContextFactory, this.getDefaultBehavior(), this.getScopeResolver()); }  @Override PDPEngine newEngine(); @Override PDPEngine newEngine(final Properties properties); }
OnapPdpEngineFactory extends PDPEngineFactory { @Override public PDPEngine newEngine() throws FactoryException { final EvaluationContextFactory evaluationContextFactory = EvaluationContextFactory.newInstance(); if (evaluationContextFactory == null) { this.logger.error("Null EvaluationContextFactory"); throw new FactoryException("Null EvaluationContextFactory"); } return new OnapPdpEngine(evaluationContextFactory, this.getDefaultBehavior(), this.getScopeResolver()); }  @Override PDPEngine newEngine(); @Override PDPEngine newEngine(final Properties properties);  }