### Question:
RequestContext { public void setServerName(String serverName) { if (StringUtils.isNotBlank(serverName)) { if (!Utilities.isValidRestrictedDirectoryName(serverName)) { throw new IllegalArgumentException(String.format("Invalid server name '%s'", serverName)); } this.serverName = serverName.toLowerCase(); } }  RequestType getRequestType(); void setRequestType(RequestType requestType); String getOption(String option, String defaultValue); int getOption(String option, int defaultValue); int getOption(String option, int defaultValue, boolean naturalOnly); String getOption(String option); boolean getOption(String option, boolean defaultValue); void addOption(String name, String value); Map<String, String> getOptions(); String getRemoteLogin(); void setRemoteLogin(String remoteLogin); String getRemoteSecret(); void setRemoteSecret(String remoteSecret); byte[] getUserData(); void setUserData(byte[] userData); byte[] getFragmentMetadata(); void setFragmentMetadata(byte[] fragmentMetadata); byte[] getFragmentUserData(); void setFragmentUserData(byte[] userData); int getTotalSegments(); void setTotalSegments(int totalSegments); int getSegmentId(); void setSegmentId(int segmentId); boolean hasFilter(); boolean hasColumnProjection(); String getFilterString(); void setFilterString(String filterString); List<ColumnDescriptor> getTupleDescription(); void setTupleDescription(List<ColumnDescriptor> tupleDescription); int getColumns(); ColumnDescriptor getColumn(int index); String getConfig(); void setConfig(String config); ColumnDescriptor getRecordkeyColumn(); void setRecordkeyColumn(ColumnDescriptor recordkeyColumn); String getDataSource(); void setDataSource(String dataSource); String getProfile(); void setProfile(String profile); String getAccessor(); void setAccessor(String accessor); String getResolver(); void setResolver(String resolver); String getFragmenter(); void setFragmenter(String fragmenter); Object getMetadata(); void setMetadata(Object metadata); String getLogin(); String getSecret(); int getDataFragment(); void setDataFragment(int dataFragment); EnumAggregationType getAggType(); void setAggType(EnumAggregationType aggType); String getFormat(); void setFormat(String format); int getFragmentIndex(); void setFragmentIndex(int fragmentIndex); int getNumAttrsProjected(); void setNumAttrsProjected(int numAttrsProjected); String getServerName(); void setServerName(String serverName); String getUser(); void setUser(String user); int getPort(); void setPort(int port); GreenplumCSV getGreenplumCSV(); void setGreenplumCSV(GreenplumCSV greenplumCSV); OutputFormat getOutputFormat(); void setOutputFormat(OutputFormat outputFormat); String getHost(); void setHost(String host); String getToken(); void setToken(String token); int getStatsMaxFragments(); void setStatsMaxFragments(int statsMaxFragments); float getStatsSampleRatio(); void setStatsSampleRatio(float statsSampleRatio); void validate(); PluginConf getPluginConf(); void setPluginConf(PluginConf pluginConf); String getProfileScheme(); void setProfileScheme(String profileScheme); String getProtocol(); void setProtocol(String protocol); Map<String, String> getAdditionalConfigProps(); void setAdditionalConfigProps(Map<String, String> additionalConfigProps); String getTransactionId(); void setTransactionId(String transactionId); String inferFormatName();  }### Answer:
@Test public void testInvalidServerName() { thrown.expect(IllegalArgumentException.class); thrown.expectMessage("Invalid server name 'foo,bar'"); context.setServerName("foo,bar"); }