### Question:
EntityIdCoder { public static String getEntityName(String id) { int separator = id.indexOf(ID_SEPARATOR); if (separator <= 0 || separator == id.length() - 1) { throw new IllegalArgumentException("Invalid String id: " + id); } String name = id.substring(0, separator); if (name.startsWith(TEMP_ID_PREFIX)) { name = name.substring(TEMP_PREFIX_LENGTH); } return name; } EntityIdCoder(ObjEntity entity); static String getEntityName(String id); String toStringId(ObjectId id); ObjectId toObjectId(String stringId);  }### Answer:
@Test public void testGetEntityName() { assertEquals("M", EntityIdCoder.getEntityName("M:N:K")); assertEquals("M", EntityIdCoder.getEntityName(".M:N:K")); }