### Question:
RequestOperationLevel { public static String getInternalLevelName(String external) throws IllegalArgumentException{ String refinedAlias = external.trim().toUpperCase(); for (String [] pair : LEVEL_ALIASES) { if (pair[ALIAS_COLUMN].equals(refinedAlias)) { return pair[INTERNAL_NAME_COLUMN]; } } String message = String.format("Unknown operation level %s", external); throw new IllegalArgumentException(message); } RequestOperationLevel(Resource.Type level, String clusterName,
                               String serviceName, String hostComponentName,
                               String hostName);  RequestOperationLevel(Map<String, String> requestInfoProperties); static String getInternalLevelName(String external); static String getExternalLevelName(String internal); Resource.Type getLevel(); String getClusterName(); String getServiceName(); String getHostComponentName(); String getHostName(); @Override String toString(); static Map<String, String> propertiesFor(Resource.Type type, String clusterName); static final String OPERATION_LEVEL_ID; static final String OPERATION_CLUSTER_ID; static final String OPERATION_SERVICE_ID; static final String OPERATION_HOSTCOMPONENT_ID; static final String OPERATION_HOST_NAME; }### Answer:
@Test public void testGetInternalLevelName() throws Exception { String internal = RequestOperationLevel.getInternalLevelName(host_component); assertEquals(internal, hostComponent); internal = RequestOperationLevel.getInternalLevelName(host_component.toLowerCase()); assertEquals(internal, hostComponent); try { RequestOperationLevel.getInternalLevelName("Wrong_param"); fail("Should throw exception"); } catch (IllegalArgumentException e) { } }