<commit_before>package me.taborda.mashtv.unit ;

import static org.mockito.Mockito.when ;

import org.junit.Rule ;
import org.junit.Test ;
import org.junit.rules.ExpectedException ;
import org.mockito.InjectMocks ;
import org.mockito.Mock ;

import me.taborda.mashtv.AbstractUnitTest ;
import me.taborda.mashtv.model.Feed ;
import me.taborda.mashtv.repository.FeedRepository ;
import me.taborda.mashtv.service.EpisodeService ;
import me.taborda.mashtv.service.FeedService ;
import me.taborda.mashtv.service.ShowService ;

public class FeedServiceTest extends AbstractUnitTest {

    @InjectMocks
    private FeedService victim ;

    @Mock
    private FeedRepository repository ;

    @Mock
    private ShowService shows ;

    @Mock
    private EpisodeService episodes ;

    @Mock
    private Feed feed ;

    @Rule
    public ExpectedException exception = ExpectedException.none() ;

    @Test
    public void loadShouldFailWhenMalformedURL() {
        String url = "malformed URL" ;
        when(feed.getUrl()).thenReturn(url) ;
        exception.expect(RuntimeException.class) ;
        exception.expectMessage("Invalid feed URL: " + url) ;
        victim.load(feed) ;
    }

}<commit_msg>Fixed a broken test<commit_after>package me.taborda.mashtv.unit ;

import static org.mockito.Mockito.verifyNoMoreInteractions ;
import static org.mockito.Mockito.when ;

import org.junit.Test ;
import org.mockito.InjectMocks ;
import org.mockito.Mock ;

import me.taborda.mashtv.AbstractUnitTest ;
import me.taborda.mashtv.model.Feed ;
import me.taborda.mashtv.repository.FeedRepository ;
import me.taborda.mashtv.service.EpisodeService ;
import me.taborda.mashtv.service.FeedService ;
import me.taborda.mashtv.service.ShowService ;

public class FeedServiceTest extends AbstractUnitTest {

    @InjectMocks
    private FeedService victim ;

    @Mock
    private FeedRepository repository ;

    @Mock
    private ShowService shows ;

    @Mock
    private EpisodeService episodes ;

    @Mock
    private Feed feed ;

    @Test
    public void loadShouldNotFailWhenMalformedURL() {
        String url = "malformed URL" ;
        when(feed.getUrl()).thenReturn(url) ;
        victim.load(feed) ;
        verifyNoMoreInteractions(shows, episodes) ;
    }

}
{'fraction_non_alphanumeric': 0.0888494002665482, 'fraction_numerical': 0.0, 'mean_word_length': 3.595918367346939, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4667234', 'n_tokens_mistral': 707, 'n_tokens_neox': 690, 'n_words': 138}