DelegatingRestrictor implements Restrictor { public boolean isHttpMethodAllowed(HttpMethod pMethod) { return checkRestrictorService(HTTP_METHOD_CHECK,pMethod); } DelegatingRestrictor(BundleContext pBundleContext); boolean isHttpMethodAllowed(HttpMethod pMethod); boolean isTypeAllowed(RequestType pType); boolean isAttributeReadAllowed(ObjectName pName, String pAttribute); boolean isAttributeWriteAllowed(ObjectName pName, String pAttribute); boolean isOperationAllowed(ObjectName pName, String pOperation); boolean isRemoteAccessAllowed(String... pHostOrAddress); boolean isOriginAllowed(String pOrigin, boolean pOnlyWhenStrictCheckingIsEnabled);  }
@Test(expectedExceptions = IllegalArgumentException.class,expectedExceptionsMessageRegExp = ".*Impossible.*") public void invalidSyntax() throws InvalidSyntaxException { expect(context.getServiceReferences("org.jolokia.restrictor.Restrictor", null)).andThrow(new InvalidSyntaxException("", null)); replay(context); restrictor.isHttpMethodAllowed(HttpMethod.GET); }