### Question:
ClouderaAPIUtil { public static String getDatasetName(String path) { if (StringUtils.isNotBlank(path)) { String[] separatedPath = path.split("/"); for (int i = separatedPath.length - 1; i >= 0; i--) { if (StringUtils.isNotBlank(separatedPath[i])) { return separatedPath[i]; } } } return "UnamedTalendDataset"; }  static boolean isFileInputOutputComponent(String componentName); static String getDatasetName(String path); static NavigatorNode retrieveNavigatorNode(String name, List<NavigatorNode> navigatorNodes); static Boolean isFieldinComponent(String componentName, String fieldName, List<NavigatorNode> navigatorNodes); static String extractNavigatorURL(String navigatorUrl); static final String[] FILE_INPUT_OUTPUT_COMPONENT_PREFIXS; }### Answer:
@Test public void testGetDatasetName() { assertEquals("my", ClouderaAPIUtil.getDatasetName("/my")); assertEquals("path", ClouderaAPIUtil.getDatasetName("/my/path")); assertEquals("path", ClouderaAPIUtil.getDatasetName("/my/path/")); assertEquals("path", ClouderaAPIUtil.getDatasetName("/my/long/path")); assertEquals("path", ClouderaAPIUtil.getDatasetName("this/is/my/long assertEquals("path", ClouderaAPIUtil.getDatasetName("path/")); assertEquals("path", ClouderaAPIUtil.getDatasetName("path assertEquals("UnamedTalendDataset", ClouderaAPIUtil.getDatasetName("/")); assertEquals("UnamedTalendDataset", ClouderaAPIUtil.getDatasetName(" assertEquals("UnamedTalendDataset", ClouderaAPIUtil.getDatasetName("")); assertEquals("UnamedTalendDataset", ClouderaAPIUtil.getDatasetName(null)); }