### Question:
ServiceProvider { public static <T> T loadClass(String name, Class<?> clazz) { final InputStream is = getResourceAsStream(getContextClassLoader(), name); BufferedReader reader; try { try { reader = new BufferedReader(new InputStreamReader(is, "UTF-8")); } catch (java.io.UnsupportedEncodingException e) { reader = new BufferedReader(new InputStreamReader(is)); } String serviceName = reader.readLine(); reader.close(); if (serviceName != null && !"".equals(serviceName)) { return initService(getContextClassLoader(), serviceName, clazz); } else { LOG.warn("ServiceName is empty!"); return null; } } catch (Exception e) { LOG.error("Error occured when looking for resource file " + name, e); } return null; }  static List<T> load(String name, Class<?> clazz); static T loadClass(String name, Class<?> clazz); static final String TRANSACTION_SERVICE_ID; static final String TRANSACTION_LISTENER_ID; }### Answer:
@Test public void loadTransactionMsgServiceTest() { TransactionalMessageService transactionService = ServiceProvider.loadClass(ServiceProvider.TRANSACTION_SERVICE_ID, TransactionalMessageService.class); assertThat(transactionService).isNotNull(); }
@Test public void loadAbstractTransactionListenerTest() { AbstractTransactionalMessageCheckListener listener = ServiceProvider.loadClass(ServiceProvider.TRANSACTION_LISTENER_ID, AbstractTransactionalMessageCheckListener.class); assertThat(listener).isNotNull(); }