ApiListener extends PushingListenerAdapter<String> implements HasPhysicalDestination, ReceiverAware<String> { @IbisDoc({"3", "the specified contentType on requests, if it doesn't match the request will fail", "ANY"}) public void setConsumes(String value) { String consumes = null; if(StringUtils.isEmpty(value)) consumes = "ANY"; else consumes = value.toUpperCase(); this.consumes = MediaTypes.valueOf(consumes); }  @Override void configure(); @Override void open(); @Override void close(); String processRequest(String correlationId, String message, IPipeLineSession requestContext); @Override String getPhysicalDestinationName(); String getCleanPattern(); boolean isConsumable(String contentType); boolean accepts(String acceptHeader); String getContentType(); @IbisDoc({"1", "HTTP method eq. GET POST PUT DELETE", ""}) void setMethod(String method); String getMethod(); @IbisDoc({"2", "uri pattern to register this listener on, eq. `/my-listener/{something}/here`", ""}) void setUriPattern(String uriPattern); String getUriPattern(); @IbisDoc({"3", "the specified contentType on requests, if it doesn't match the request will fail", "ANY"}) void setConsumes(String value); String getConsumes(); @IbisDoc({"4", "the specified contentType on response", "ANY"}) void setProduces(String value); String getProduces(); @IbisDoc({"5", "sets the specified character encoding on the response contentType header", "UTF-8"}) void setCharacterEncoding(String charset); String getCharacterEncoding(); @IbisDoc({"6", "automatically generate and validate etags", "true"}) void setUpdateEtag(boolean updateEtag); boolean getUpdateEtag(); @IbisDoc({"7", "enables security for this listener, must be one of [NONE, COOKIE, HEADER, AUTHROLE]. If you wish to use the application servers authorisation roles [AUTHROLE], you need to enable them globally for all ApiListeners with the `servlet.ApiListenerServlet.securityroles=ibistester,ibiswebservice` property", "NONE"}) void setAuthenticationMethod(String authenticationMethod); AuthenticationMethods getAuthenticationMethod(); @IbisDoc({"8", "only active when AuthenticationMethod=AUTHROLE. comma separated list of authorization roles which are granted for this service, eq. ibistester,ibisobserver", ""}) void setAuthenticationRoles(String authRoles); List<String> getAuthenticationRoles(); @IbisDoc({"9", "specify the form-part you wish to enter the pipeline", "name of the first form-part"}) void setMultipartBodyName(String multipartBodyName); String getMultipartBodyName(); @IbisDoc({"10", "name of the header which contains the message-id", "message-id"}) void setMessageIdHeader(String messageIdHeader); String getMessageIdHeader(); @Override String toString(); @Override void setReceiver(IReceiver<String> receiver); @Override IReceiver<String> getReceiver();  }
@Test(expected=IllegalArgumentException.class) public void testUnknownConsumes() throws ConfigurationException { listener.setConsumes("unknown"); }