ResourceHandler { static String buildPath(String identifier, String root, String appendix) { final String fc = identifier.substring(12, 16); final String sd = identifier.substring(16, 22); return root + "/" + fc + "/" + sd + "/" + identifier + appendix; }    }
@Test public void testBuildPath() { String path = ResourceHandler.buildPath("DBL_SM_XXXX_MIR_SMDAP2_0300", "flags", ".csv"); assertEquals("flags/MIR_/SMDAP2/DBL_SM_XXXX_MIR_SMDAP2_0300.csv", path); path = ResourceHandler.buildPath("DBL_SM_XXXX_MIR_BWLF1C_0300", "schemas", ".binXschema.xml"); assertEquals("schemas/MIR_/BWLF1C/DBL_SM_XXXX_MIR_BWLF1C_0300.binXschema.xml", path); }