mil.dod.th.ose.transcoder.vlc/test/mil/dod/th/ose/transcoder/vlc/TestVlcTranscoder.java
@Test
    public void testStop() throws TranscoderException
    {
        final double bitrateKbps = 10.0;
        
        final Map<String, Object> configParams = new HashMap<>();
        configParams.put(TranscoderService.CONFIG_PROP_BITRATE_KBPS, bitrateKbps);
        configParams.put(TranscoderService.CONFIG_PROP_FORMAT, m_MimeTypeMpeg);
        
        m_SUT.activate();     
        assertThat(m_SUT.getActiveProcessIds(), is(Matchers.<String>empty()));
        
        m_SUT.start(m_ProcessId, m_SourceStream, m_MulticastUri, configParams);
        
        verify(m_MediaPlayer).addMediaPlayerEventListener(Mockito.any(MediaPlayerEventListener.class));
        verify(m_MediaPlayer).playMedia(anyString(), (String)anyVararg());
        assertThat(m_SUT.getActiveProcessIds(), hasItem(m_ProcessId));

        //Stop the transcoding process
        m_SUT.stop(m_ProcessId);

        assertThat(m_SUT.getActiveProcessIds(), not(hasItem(m_ProcessId)));
        verify(m_WakeLock).cancel();
    }
/**
     * Verify that a transcoding process can be started and subsequently stopped.
     * 
     * @throws TranscoderException
     *      if the transcoder instance produces an error.
     */
Verify that a transcoding process can be started and subsequently stopped.

@throws TranscoderException
if the transcoder instance produces an error.
Verify that a transcoding process can be started and subsequently stopped . @throws TranscoderException if the transcoder instance produces an error .
@Test
    public void testStop() throws TranscoderException
    {
        final double bitrateKbps = 10.0;
        final Map<String, Object> configParams = new HashMap<>();
        configParams.put(TranscoderService.CONFIG_PROP_BITRATE_KBPS, bitrateKbps);
        configParams.put(TranscoderService.CONFIG_PROP_FORMAT, m_MimeTypeMpeg);
        m_SUT.activate();     
        assertThat(m_SUT.getActiveProcessIds(), is(Matchers.<String>empty()));
        m_SUT.start(m_ProcessId, m_SourceStream, m_MulticastUri, configParams);
        verify(m_MediaPlayer).addMediaPlayerEventListener(Mockito.any(MediaPlayerEventListener.class));
        verify(m_MediaPlayer).playMedia(anyString(), (String)anyVararg());
        assertThat(m_SUT.getActiveProcessIds(), hasItem(m_ProcessId));
        m_SUT.stop(m_ProcessId);
        assertThat(m_SUT.getActiveProcessIds(), not(hasItem(m_ProcessId)));
        verify(m_WakeLock).cancel();
    }
@ Test public void testStop ( ) throws TranscoderException { final double bitrateKbps = 10.0 ; final Map < String , Object > configParams = new HashMap < > ( ) ; configParams . put ( TranscoderService . CONFIG_PROP_BITRATE_KBPS , bitrateKbps ) ; configParams . put ( TranscoderService . CONFIG_PROP_FORMAT , m_MimeTypeMpeg ) ; m_SUT . activate ( ) ; assertThat ( m_SUT . getActiveProcessIds ( ) , is ( Matchers . < String > empty ( ) ) ) ; m_SUT . start ( m_ProcessId , m_SourceStream , m_MulticastUri , configParams ) ; verify ( m_MediaPlayer ) . addMediaPlayerEventListener ( Mockito . any ( MediaPlayerEventListener . class ) ) ; verify ( m_MediaPlayer ) . playMedia ( anyString ( ) , ( String ) anyVararg ( ) ) ; assertThat ( m_SUT . getActiveProcessIds ( ) , hasItem ( m_ProcessId ) ) ; m_SUT . stop ( m_ProcessId ) ; assertThat ( m_SUT . getActiveProcessIds ( ) , not ( hasItem ( m_ProcessId ) ) ) ; verify ( m_WakeLock ) . cancel ( ) ; }
Verify that a transcoding process can be started and subsequently stopped.
Verify that a transcoding process can be started and subsequently stopped .
//Stop the transcoding process