public PeachState testTeardown()// throws PeachApiException
    {
        if(_debug)
            System.out.println(">>testTeardown");
        
        try
        {
            stashUnirestProxy();
        
            HttpResponse<String> ret = null;
            try {
                ret = Unirest
                        .post(String.format("%s/api/sessions/%s/TestTearDown", _api, _jobid))
                        .header(_token_header, _api_token)
                        .asString();
            } catch (UnirestException ex) {
                Logger.getLogger(PeachProxy.class.getName()).log(Level.SEVERE, "Error contacting Peach API", ex);
                throw new PeachApiException(
                        String.format("Error, exception contacting Peach API: %s", ex.getMessage()), ex);
            }

            if(ret == null)
            {
                throw new PeachApiException("Error, in Proxy.testTearDown: ret was null", null);
            }

            if(ret.getStatus() != 200)
            {
                String errorMsg = String.format("Error, /api/sessions/{jobid}/TestTearDown returned status code of %d: %s", 
                        ret.getStatus(), ret.getStatusText());

                throw new PeachApiException(errorMsg, null);
            }
            
            String body = ret.getBody();
            String strState = body.substring(1, body.length()-1);
            _state = PeachState.valueOf(strState);
            
            if(_debug)
                System.out.println(String.format("<<testTeardown: State: %s", _state));
        
            return _state;
        }
        catch(Exception ex)
        {
            if(_debug)
                System.out.println(String.format("<<testTeardown(): Error: %s", ex.toString()));
            
            _state = PeachState.Error;
            return _state;
            
            //throw ex;
        }
        finally
        {
            revertUnirestProxy();
        }
    }
public PeachState testTeardown ( ) { if ( _debug ) System . out . println ( ">>testTeardown" ) ; try { stashUnirestProxy ( ) ; HttpResponse < String > ret = null ; try { ret = Unirest . post ( String . format ( "%s/api/sessions/%s/TestTearDown" , _api , _jobid ) ) . header ( _token_header , _api_token ) . asString ( ) ; } catch ( UnirestException ex ) { Logger . getLogger ( PeachProxy . class . getName ( ) ) . log ( Level . SEVERE , "Error contacting Peach API" , ex ) ; throw new PeachApiException ( String . format ( "Error, exception contacting Peach API: %s" , ex . getMessage ( ) ) , ex ) ; } if ( ret == null ) { throw new PeachApiException ( "Error, in Proxy.testTearDown: ret was null" , null ) ; } if ( ret . getStatus ( ) != 200 ) { String errorMsg = String . format ( "Error, /api/sessions/{jobid}/TestTearDown returned status code of %d: %s" , ret . getStatus ( ) , ret . getStatusText ( ) ) ; throw new PeachApiException ( errorMsg , null ) ; } String body = ret . getBody ( ) ; String strState = body . substring ( 1 , body . length ( ) - 1 ) ; _state = PeachState . valueOf ( strState ) ; if ( _debug ) System . out . println ( String . format ( "<<testTeardown: State: %s" , _state ) ) ; return _state ; } catch ( Exception ex ) { if ( _debug ) System . out . println ( String . format ( "<<testTeardown(): Error: %s" , ex . toString ( ) ) ) ; _state = PeachState . Error ; return _state ; } finally { revertUnirestProxy ( ) ; } }
Notify Peach Proxy that teardown tasks are about to run.

This will disable fuzzing of messages so the teardown tasks
always work OK.

@return Action to take