### Question:
PathUtil { public static String taskPath(String taskName) { taskName = StringUtils.strip(taskName, "/"); Preconditions.checkArgument(StringUtils.isNotEmpty(taskName), "Task name can not be empty."); Preconditions.checkArgument(StringUtils.containsNone(taskName, "/"), "Task name can not contain separator."); Preconditions.checkArgument(StringUtils.containsNone(taskName, "$"), "Task name can not contain special chars."); return taskBasePath() + "/" + taskName; }  static String taskBasePath(); static String strategyBasePath(); static String factoryBasePath(); static String taskPath(String taskName); static String strategyPath(String strategyName); static String factoryPath(String factoryUUID); static String factoryForStrategyPath(String strategyName, String factoryUUID); static String runningEntryPath(String taskName, String ownSign); static String taskItemBasePath(String taskName, String ownSign); static String taskItemPath(String taskName, String ownSign, String taskItem); static String serverBasePath(String taskName, String ownSign); static String serverPath(String taskName, String ownSign, String serverName);  }### Answer:
@Test(expected = IllegalArgumentException.class) public void taskPathNull() { PathUtil.taskPath(null); }
@Test(expected = IllegalArgumentException.class) public void taskPathEmpty() { PathUtil.taskPath(""); }
@Test(expected = IllegalArgumentException.class) public void taskPathIllegal1() { PathUtil.taskPath(" }
@Test(expected = IllegalArgumentException.class) public void taskPathIllegal2() { PathUtil.taskPath("as/df"); }
@Test(expected = IllegalArgumentException.class) public void taskPathIllegal3() { PathUtil.taskPath("as$df"); }
@Test public void taskPath() { assertEquals("/task/test", PathUtil.taskPath("test")); }