### Question:
ThriftUtils { public static boolean isApplicationLevelException(Throwable ex) { if (ex instanceof TException) { return !THRIFT_EXCEPTION_CLASSES.contains(ex.getClass()); } if (ex instanceof ThriftApplicationException) { return true; } return false; }  static Class<?> getClassByName(Class<?> root, String name); static Class<?> getThriftRootClass(Class<?> generatedChildClass); static boolean parseBoolean(String val); static String getThriftServiceName(Class<?> generatedChildClass, Optional<String> subServiceName); static String getThriftServiceName(Class<?> generatedChildClass); static String getThriftFullServiceName(Class<?> generatedChildClass, Optional<String> subServiceName); static String getThriftFullServiceName(Class<?> generatedChildClass); static boolean isApplicationLevelException(Throwable ex); static String getHostName(); static CompletableFuture<T> firstSuccess(Stream<CompletableFuture<T>> futures); static boolean empty(String str); static long parseLong(byte[] bytes); static long parseLong(byte[] bytes, int offset); static final String QIWI_APP_HOST_NAME; }### Answer:
@Test(groups = "unit") public void isApplicationLevelException() throws Exception { assertTrue(ThriftUtils.isApplicationLevelException(new TestException())); assertTrue(ThriftUtils.isApplicationLevelException(new ThriftApplicationException("test"))); assertFalse(ThriftUtils.isApplicationLevelException(new ThriftConnectionException("test"))); assertFalse(ThriftUtils.isApplicationLevelException(new TException("test"))); assertFalse(ThriftUtils.isApplicationLevelException(new TTransportException("test"))); assertFalse(ThriftUtils.isApplicationLevelException(new RuntimeException("test"))); }