OresHelper { public static String createStringRepresenting(OLATResourceable ores, String subKey) { String resourcableTypeName = ores.getResourceableTypeName(); if (resourcableTypeName.length() > 80) { resourcableTypeName = Encoder.encrypt(resourcableTypeName); } String derivedString = resourcableTypeName + "::" + ores.getResourceableId(); if (subKey != null) { if (subKey.length() > 25) { subKey = subKey.substring(subKey.length() - 25, subKey.length()); } derivedString = subKey + "@" + derivedString; } return derivedString; }  static OLATResourceable createOLATResourceableInstance(final String type, final Long key); static OLATResourceable createOLATResourceableType(final String type, final String subtype); static OLATResourceable createOLATResourceableType(final String type); static OLATResourceable createOLATResourceableType(Class clazz); static OLATResourceable createOLATResourceableInstance(Class aClass, final Long key); static String createStringRepresenting(OLATResourceable ores, String subKey); static String createStringRepresenting(OLATResourceable ores); static OLATResourceable lookupType(Class aClass); static String calculateTypeName(Class aClass); static String calculateTypeName(Class aClass, String subType); static boolean isOfType(OLATResourceable ores, Class aClass); static OLATResourceable lookupType(Class aClass, String subType); static boolean equals(OLATResourceable a, OLATResourceable b); static OLATResourceable createOLATResourceableTypeWithoutCheck(String type); static OLATResourceable createOLATResourceableInstanceWithoutCheck(final String type, final Long key); static final int ORES_TYPE_LENGTH; }
@Test public void createStringRepresenting() { String oresStringRespresentation = OresHelper.createStringRepresenting(oLATResourceable); assertEquals(RESOURCEABLE_STRING_REPRESENTATION, oresStringRespresentation); }