### Question:
Paths { public static String getInstanceDirPath(final Node node, final String instanceName) { if (!StringUtils.ok(instanceName)) throw new IllegalArgumentException(); return getNodeDir(node) + "/" + instanceName; } private  Paths(); final static String getNodesDir(final Node node); final static String getNodeDir(final Node node); final static String getDasPropsPath(final Node node); static String getInstanceDirPath(final Node node, final String instanceName); final static String DAS_PROPS_FILENAME; final static String DAS_PROPS_SUBPATH; }### Answer:
@Test public void testGetInstanceDirPath() { String d1 = Paths.getInstanceDirPath(new NodeWithNodeDir(), INSTANCE_NAME); String d2 = Paths.getInstanceDirPath(new NodeWithoutNodeDir(), INSTANCE_NAME); System.out.println("User-specified Instance Dir: " + d1); System.out.println("Default Node Dir Instance Dir: " + d2); assertEquals(d2, SPECIFIED_INSTALL_DIR + "/glassfish/nodes/" + NODE_NAME + "/" + INSTANCE_NAME); assertEquals(d1, SPECIFIED_NODE_DIR + "/" + INSTANCE_NAME); }