### Question:
IRODSRule { public static IRODSRule instance(final String ruleAsOriginalText, final List<IRODSRuleParameter> irodsRuleInputParameters, final List<IRODSRuleParameter> irodsRuleOutputParameters, final String ruleBody, final RuleInvocationConfiguration ruleInvocationConfiguration) throws JargonException { return new IRODSRule(ruleAsOriginalText, irodsRuleInputParameters, irodsRuleOutputParameters, ruleBody, ruleInvocationConfiguration); } private  IRODSRule(final String ruleAsOriginalText, final List<IRODSRuleParameter> irodsRuleInputParameters,
			final List<IRODSRuleParameter> irodsRuleOutputParameters, final String ruleBody,
			final RuleInvocationConfiguration ruleInvocationConfiguration); @Override String toString(); static IRODSRule instance(final String ruleAsOriginalText,
			final List<IRODSRuleParameter> irodsRuleInputParameters,
			final List<IRODSRuleParameter> irodsRuleOutputParameters, final String ruleBody,
			final RuleInvocationConfiguration ruleInvocationConfiguration); String getRuleAsOriginalText(); List<IRODSRuleParameter> getIrodsRuleInputParameters(); List<IRODSRuleParameter> getIrodsRuleOutputParameters(); String getRuleBody(); RuleInvocationConfiguration getRuleInvocationConfiguration();  }### Answer:
@Test public void testInstance() throws Exception { RuleInvocationConfiguration irodsRuleInvocationConfiguration = new RuleInvocationConfiguration(); IRODSRule irodsRule = IRODSRule.instance("x", new ArrayList<IRODSRuleParameter>(), new ArrayList<IRODSRuleParameter>(), "yyy", irodsRuleInvocationConfiguration); Assert.assertNotNull("no return from initializer", irodsRule); }
@Test(expected = IllegalArgumentException.class) public void testInstanceNullRuleOrigText() throws Exception { RuleInvocationConfiguration irodsRuleInvocationConfiguration = new RuleInvocationConfiguration(); IRODSRule.instance(null, new ArrayList<IRODSRuleParameter>(), new ArrayList<IRODSRuleParameter>(), "yyy", irodsRuleInvocationConfiguration); }
@Test(expected = IllegalArgumentException.class) public void testInstanceBlankRuleOrigText() throws Exception { RuleInvocationConfiguration irodsRuleInvocationConfiguration = new RuleInvocationConfiguration(); IRODSRule.instance("", new ArrayList<IRODSRuleParameter>(), new ArrayList<IRODSRuleParameter>(), "yyy", irodsRuleInvocationConfiguration); }
@Test(expected = IllegalArgumentException.class) public void testInstanceNullInputParams() throws Exception { RuleInvocationConfiguration irodsRuleInvocationConfiguration = new RuleInvocationConfiguration(); IRODSRule.instance("xxxx", null, new ArrayList<IRODSRuleParameter>(), "yyy", irodsRuleInvocationConfiguration); }
@Test(expected = IllegalArgumentException.class) public void testInstanceNullOutputParams() throws Exception { RuleInvocationConfiguration irodsRuleInvocationConfiguration = new RuleInvocationConfiguration(); IRODSRule.instance("xxxx", new ArrayList<IRODSRuleParameter>(), null, "yyy", irodsRuleInvocationConfiguration); }
@Test(expected = IllegalArgumentException.class) public void testInstanceNullRuleBody() throws Exception { RuleInvocationConfiguration irodsRuleInvocationConfiguration = new RuleInvocationConfiguration(); IRODSRule.instance("xxxx", new ArrayList<IRODSRuleParameter>(), new ArrayList<IRODSRuleParameter>(), null, irodsRuleInvocationConfiguration); }
@Test(expected = IllegalArgumentException.class) public void testInstanceBlankRuleBody() throws Exception { RuleInvocationConfiguration irodsRuleInvocationConfiguration = new RuleInvocationConfiguration(); IRODSRule.instance("xxxx", new ArrayList<IRODSRuleParameter>(), new ArrayList<IRODSRuleParameter>(), "", irodsRuleInvocationConfiguration); }