AbstractRsJs { String getJsFilename(String classname, String fwk) { String path = classname.replaceAll("\\.", File.separator); if (null != fwk) { return File.separator + path + "." + fwk + Constants.JS; } return File.separator + path + Constants.JS; }  @GET @Produces(Constants.JSTYPE) Response getJs();  }
@Test public void testGetJsFilenameFwk() { System.out.println("getJsFilename"); String classname = "p1.p2.p3.Cls1"; String expResult = "/p1/p2/p3/Cls1.fwk.js"; String result = instance.getJsFilename(classname, "fwk"); assertThat(result).isEqualTo(expResult); }
@Test public void testGetJsFilenameNoFwk() { System.out.println("getJsFilename"); String classname = "p1.p2.p3.Cls1"; String expResult = "/p1/p2/p3/Cls1.js"; String result = instance.getJsFilename(classname, null); assertThat(result).isEqualTo(expResult); }