mil.dod.th.ose.transcoder.vlc/test/mil/dod/th/ose/transcoder/vlc/TestVlcTranscoder.java
@Test
    public void testStart() 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());
        verify(m_WakeLock).activate();
        
        assertThat(m_SUT.getActiveProcessIds(), hasItem(m_ProcessId));
        
        m_SUT.deactivate();
        verify(m_MediaPlayer).stop();
        verify(m_MediaPlayer).release();
        verify(m_WakeLock).delete();
    }
/**
     * Verify that a transcoding process can be started.
     * 
     * @throws TranscoderException
     *      if the transcoder instance produces an error.
     */
Verify that a transcoding process can be started.

@throws TranscoderException
if the transcoder instance produces an error.
Verify that a transcoding process can be started . @throws TranscoderException if the transcoder instance produces an error .
@Test
    public void testStart() 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());
        verify(m_WakeLock).activate();
        assertThat(m_SUT.getActiveProcessIds(), hasItem(m_ProcessId));
        m_SUT.deactivate();
        verify(m_MediaPlayer).stop();
        verify(m_MediaPlayer).release();
        verify(m_WakeLock).delete();
    }
@ Test public void testStart ( ) 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 ( ) ) ; verify ( m_WakeLock ) . activate ( ) ; assertThat ( m_SUT . getActiveProcessIds ( ) , hasItem ( m_ProcessId ) ) ; m_SUT . deactivate ( ) ; verify ( m_MediaPlayer ) . stop ( ) ; verify ( m_MediaPlayer ) . release ( ) ; verify ( m_WakeLock ) . delete ( ) ; }
Verify that a transcoding process can be started.
Verify that a transcoding process can be started .