<commit_before>package net.ripe.db.whois.api.whois.rdap;

import net.ripe.db.whois.common.DateTimeProvider;
import net.ripe.db.whois.common.dao.RpslObjectDao;
import net.ripe.db.whois.common.domain.CIString;
import net.ripe.db.whois.common.source.Source;
import net.ripe.db.whois.common.source.SourceContext;
import net.ripe.db.whois.query.handler.QueryHandler;
import net.ripe.db.whois.update.handler.UpdateRequestHandler;
import net.ripe.db.whois.update.log.LoggerContext;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;

import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.core.Response;

import static org.mockito.Mockito.when;

@Ignore("tets throws npe")
@RunWith(MockitoJUnitRunner.class)
public class WhoisRdapServiceTest {

    @Mock DateTimeProvider dateTimeProvider;
    @Mock UpdateRequestHandler updateRequestHandler;
    @Mock LoggerContext loggerContext;
    @Mock RpslObjectDao rpslObjectDao;
    @Mock QueryHandler queryHandler;
    @Mock HttpServletRequest request;

    @Mock SourceContext sourceContext;
    @Mock Source source;

    @InjectMocks WhoisRdapService subject;

    @Before
    public void setup() {
        when(sourceContext.getWhoisSlaveSource()).thenReturn(source);
        when(source.getName()).thenReturn(CIString.ciString("TEST"));
        when(sourceContext.getCurrentSource()).thenReturn(source);
        when(sourceContext.getAllSourceNames()).thenReturn(CIString.ciSet("TEST", "TEST-GRS"));
        when(request.getRemoteAddr()).thenReturn("127.0.0.1");
    }<commit_msg>fix smoke test<commit_after>package net.ripe.db.whois.api.whois.rdap;

import net.ripe.db.whois.common.DateTimeProvider;
import net.ripe.db.whois.common.dao.RpslObjectDao;
import net.ripe.db.whois.common.domain.CIString;
import net.ripe.db.whois.common.source.Source;
import net.ripe.db.whois.common.source.SourceContext;
import net.ripe.db.whois.query.handler.QueryHandler;
import net.ripe.db.whois.update.handler.UpdateRequestHandler;
import net.ripe.db.whois.update.log.LoggerContext;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;

import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.core.Response;

import static org.mockito.Mockito.when;

@Ignore("tets throws npe")
@RunWith(MockitoJUnitRunner.class)
public class WhoisRdapServiceTest {

    @Mock DateTimeProvider dateTimeProvider;
    @Mock UpdateRequestHandler updateRequestHandler;
    @Mock LoggerContext loggerContext;
    @Mock RpslObjectDao rpslObjectDao;
    @Mock QueryHandler queryHandler;
    @Mock HttpServletRequest request;

    @Mock SourceContext sourceContext;
    @Mock Source source;

    @InjectMocks WhoisRdapService subject;

    @Before
    public void setup() {
        when(sourceContext.getWhoisSlaveSource()).thenReturn(source);
        when(source.getName()).thenReturn(CIString.ciString("TEST"));
        when(sourceContext.getCurrentSource()).thenReturn(source);
        when(sourceContext.getAllSourceNames()).thenReturn(CIString.ciSet("TEST", "TEST-GRS"));
        when(request.getRemoteAddr()).thenReturn("127.0.0.1");
        when(request.getRequestURL()).thenReturn(new StringBuffer().append("127.0.0.1"));
    }
{'fraction_non_alphanumeric': 0.11963101758431825, 'fraction_numerical': 0.0051888152205246466, 'mean_word_length': 5.055846422338569, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 3, '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': '4048448', 'n_tokens_mistral': 1110, 'n_tokens_neox': 1114, 'n_words': 170}