### Question:
SimpleQuery extends AbstractAliasedQuery { public static SimpleQuery instanceWithOneArgument(final String queryString, final String arg, final int continuationValue) { if (arg == null) { throw new IllegalArgumentException("arg is null"); } List<String> args = new ArrayList<String>(); if (!arg.isEmpty()) { args.add(arg); } return new SimpleQuery(queryString, args, continuationValue); } private  SimpleQuery(final String queryString, final List<String> arguments, final int continuationValue); static SimpleQuery instance(final String queryString, final List<String> arguments,
			final int continuationValue); static SimpleQuery instanceWithNoArguments(final String queryString, final int continuationValue); static SimpleQuery instanceWithOneArgument(final String queryString, final String arg,
			final int continuationValue); static SimpleQuery instanceWithTwoArguments(final String queryString, final String arg1, final String arg2,
			final int continuationValue);  }### Answer:
@Test public void testInstanceOneArgValid() throws Exception { String query = "query"; String args = "args"; AbstractAliasedQuery sq = SimpleQuery.instanceWithOneArgument(query, args, 0); Assert.assertEquals("invalid query value", query, sq.getQueryString()); Assert.assertEquals("invalid args", 1, sq.getArguments().size()); }
@Test(expected = IllegalArgumentException.class) public void testInstanceWithOneArgumentNullQuery() throws Exception { String query = null; String args = "args"; SimpleQuery.instanceWithOneArgument(query, args, 0); }
@Test(expected = IllegalArgumentException.class) public void testInstanceWithOneArgumentNullArgs() throws Exception { String query = "query"; String args = null; SimpleQuery.instanceWithOneArgument(query, args, 0); }
@Test(expected = IllegalArgumentException.class) public void testInstanceWithOneArgumentBlankQuery() throws Exception { String query = ""; String args = ""; SimpleQuery.instanceWithOneArgument(query, args, 0); }