### Question:
LockTypeUtil { public static char getEncoding(LockType lockType) { return PERSISTENCE_ENCODINGS.getOrDefault(lockType, UNKNOWN_LOCK_TYPE_ENCODING); }  static char getEncoding(LockType lockType); static String getEncodingAsStr(LockType lockType); static Optional<LockType> getLockTypeFromEncoding(char encoding); static String exclusive(); static String exclWrite(); static String sharedWrite(); static String sharedRead();  }### Answer:
@Test public void testGetEncoding() { assertEquals('r', LockTypeUtil.getEncoding(LockType.SHARED_READ)); assertEquals('w', LockTypeUtil.getEncoding(LockType.SHARED_WRITE)); assertEquals('x', LockTypeUtil.getEncoding(LockType.EXCL_WRITE)); assertEquals('e', LockTypeUtil.getEncoding(LockType.EXCLUSIVE)); }