CheckUniqueMetadataValueService extends BranchingServiceImp { public void setMetadataKeyToCheck(String s) { this.metadataKeyToCheck = Args.notBlank(s, "metadataKeyToCheck"); } CheckUniqueMetadataValueService(); @Override void doService(AdaptrisMessage msg); String getMetadataKeyToCheck(); void setMetadataKeyToCheck(String s); int getNumberOfPreviousValuesToStore(); void setNumberOfPreviousValuesToStore(int i); String getStoreFileUrl(); void setStoreFileUrl(String s); String getNextServiceIdIfDuplicate(); void setNextServiceIdIfDuplicate(String s); String getNextServiceIdIfUnique(); void setNextServiceIdIfUnique(String s); @Override void prepare(); static final String DEFAULT_SERVICE_ID_UNIQUE; static final String DEFAULT_SERVICE_ID_DUPLICATE; }
@Test public void testInitWithMetadataKey() { CheckUniqueMetadataValueService s = new CheckUniqueMetadataValueService(); try { s.setMetadataKeyToCheck("key"); LifecycleHelper.init(s); fail(); } catch (Exception e) { } }