<commit_before>package ch.elexis.core.logback.rocketchat.test;

import java.io.IOException;
import java.net.MalformedURLException;

import ch.elexis.core.logback.rocketchat.IntegrationPostHandler;
import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.Logger;
import ch.qos.logback.classic.LoggerContext;
import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.classic.spi.LoggingEvent;

public class IntegrationPostHandlerTest {
	
	private static Logger testLogger = new LoggerContext().getLogger(IntegrationPostHandler.class);
	
	public static final String WEBHOOK_URL = "INSERT_URL_HERE";
	
	public static void main(String[] args) throws MalformedURLException, IOException{
		
		ILoggingEvent ile = new IntegrationPostHandlerTest().createNestedLoggingEvent(Level.DEBUG);
		System.out.println(new IntegrationPostHandler(ile, null, true).post(WEBHOOK_URL));
		
		ile = new IntegrationPostHandlerTest().createNestedLoggingEvent(Level.INFO);<commit_msg>[15819] Fix IntegrationPostHandlerTest<commit_after>package ch.elexis.core.logback.rocketchat.test;

import java.io.IOException;
import java.net.MalformedURLException;

import ch.elexis.core.logback.rocketchat.internal.IntegrationPostHandler;
import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.Logger;
import ch.qos.logback.classic.LoggerContext;
import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.classic.spi.LoggingEvent;

public class IntegrationPostHandlerTest {
	
	private static Logger testLogger = new LoggerContext().getLogger(IntegrationPostHandler.class);
	
	public static final String WEBHOOK_URL = "https://rocketchat.medelexis.ch/hooks/4qyKfbsaGP4Ruwqqg/vXmDS5fW6aGkFwrLuAzZ7yPThjHGnhiG6e9y6hyBxaQ6GMt4";
	
	
	public static void main(String[] args) throws MalformedURLException, IOException{
	
		ILoggingEvent ile = new IntegrationPostHandlerTest().createNestedLoggingEvent(Level.DEBUG);
		System.out.println(new IntegrationPostHandler(ile, null, true).post(WEBHOOK_URL));
		
		ile = new IntegrationPostHandlerTest().createNestedLoggingEvent(Level.INFO);
{'fraction_non_alphanumeric': 0.09654178674351585, 'fraction_numerical': 0.007204610951008645, 'mean_word_length': 6.950381679389313, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1897240', 'n_tokens_mistral': 710, 'n_tokens_neox': 667, 'n_words': 105}