@Test public void testUpdate() { thrown.expect(IllegalStateException.class); ElkConnectorImpl impl = new ElkConnectorImpl(); PolicyRestAdapter adapter = new PolicyRestAdapter(); impl.update(adapter); fail("Expected exception to be thrown"); }
@Override public boolean update(PolicyRestAdapter policyData) throws IllegalStateException { if (LOGGER.isDebugEnabled()) { LOGGER.debug("ENTER"); } try { boolean success = put(policyData); return success; } catch (Exception e) { LOGGER.warn(XACMLErrorConstants.ERROR_UNKNOWN + ":" + "cannot test and update", e); throw new IllegalStateException(e); } }
ElkConnectorImpl implements ElkConnector { @Override public boolean update(PolicyRestAdapter policyData) throws IllegalStateException { if (LOGGER.isDebugEnabled()) { LOGGER.debug("ENTER"); } try { boolean success = put(policyData); return success; } catch (Exception e) { LOGGER.warn(XACMLErrorConstants.ERROR_UNKNOWN + ":" + "cannot test and update", e); throw new IllegalStateException(e); } } }
ElkConnectorImpl implements ElkConnector { @Override public boolean update(PolicyRestAdapter policyData) throws IllegalStateException { if (LOGGER.isDebugEnabled()) { LOGGER.debug("ENTER"); } try { boolean success = put(policyData); return success; } catch (Exception e) { LOGGER.warn(XACMLErrorConstants.ERROR_UNKNOWN + ":" + "cannot test and update", e); throw new IllegalStateException(e); } } ElkConnectorImpl(); }
ElkConnectorImpl implements ElkConnector { @Override public boolean update(PolicyRestAdapter policyData) throws IllegalStateException { if (LOGGER.isDebugEnabled()) { LOGGER.debug("ENTER"); } try { boolean success = put(policyData); return success; } catch (Exception e) { LOGGER.warn(XACMLErrorConstants.ERROR_UNKNOWN + ":" + "cannot test and update", e); throw new IllegalStateException(e); } } ElkConnectorImpl(); @Override JestResult search(PolicyIndexType type, String text); @Override JestResult search(PolicyIndexType type, String text, Map<String, String> filter_s); boolean put(PolicyRestAdapter policyData); @Override boolean delete(PolicyRestAdapter policyData); @Override boolean update(PolicyRestAdapter policyData); }
ElkConnectorImpl implements ElkConnector { @Override public boolean update(PolicyRestAdapter policyData) throws IllegalStateException { if (LOGGER.isDebugEnabled()) { LOGGER.debug("ENTER"); } try { boolean success = put(policyData); return success; } catch (Exception e) { LOGGER.warn(XACMLErrorConstants.ERROR_UNKNOWN + ":" + "cannot test and update", e); throw new IllegalStateException(e); } } ElkConnectorImpl(); @Override JestResult search(PolicyIndexType type, String text); @Override JestResult search(PolicyIndexType type, String text, Map<String, String> filter_s); boolean put(PolicyRestAdapter policyData); @Override boolean delete(PolicyRestAdapter policyData); @Override boolean update(PolicyRestAdapter policyData);  }