public Observable<ServiceResponse<TestRouteResultInner>> testRouteWithServiceResponseAsync(String iotHubName, String resourceGroupName, TestRouteInput input) {
        if (iotHubName == null) {
            throw new IllegalArgumentException("Parameter iotHubName is required and cannot be null.");
        }
        if (this.client.subscriptionId() == null) {
            throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
        }
        if (resourceGroupName == null) {
            throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
        }
        if (input == null) {
            throw new IllegalArgumentException("Parameter input is required and cannot be null.");
        }
        if (this.client.apiVersion() == null) {
            throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
        }
        Validator.validate(input);
        return service.testRoute(iotHubName, this.client.subscriptionId(), resourceGroupName, input, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
            .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<TestRouteResultInner>>>() {
                @Override
                public Observable<ServiceResponse<TestRouteResultInner>> call(Response<ResponseBody> response) {
                    try {
                        ServiceResponse<TestRouteResultInner> clientResponse = testRouteDelegate(response);
                        return Observable.just(clientResponse);
                    } catch (Throwable t) {
                        return Observable.error(t);
                    }
                }
            });
    }
public Observable < ServiceResponse < TestRouteResultInner > > testRouteWithServiceResponseAsync ( String iotHubName , String resourceGroupName , TestRouteInput input ) { if ( iotHubName == null ) { throw new IllegalArgumentException ( "Parameter iotHubName is required and cannot be null." ) ; } if ( this . client . subscriptionId ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.subscriptionId() is required and cannot be null." ) ; } if ( resourceGroupName == null ) { throw new IllegalArgumentException ( "Parameter resourceGroupName is required and cannot be null." ) ; } if ( input == null ) { throw new IllegalArgumentException ( "Parameter input is required and cannot be null." ) ; } if ( this . client . apiVersion ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.apiVersion() is required and cannot be null." ) ; } Validator . validate ( input ) ; return service . testRoute ( iotHubName , this . client . subscriptionId ( ) , resourceGroupName , input , this . client . apiVersion ( ) , this . client . acceptLanguage ( ) , this . client . userAgent ( ) ) . flatMap ( new Func1 < Response < ResponseBody > , Observable < ServiceResponse < TestRouteResultInner > > > ( ) { @ Override public Observable < ServiceResponse < TestRouteResultInner > > call ( Response < ResponseBody > response ) { try { ServiceResponse < TestRouteResultInner > clientResponse = testRouteDelegate ( response ) ; return Observable . just ( clientResponse ) ; } catch ( Throwable t ) { return Observable . error ( t ) ; } } } ) ; }
Test the new route.
Test the new route for this Iot Hub.

@param iotHubName IotHub to be tested
@param resourceGroupName resource group which Iot Hub belongs to
@param input Route that needs to be tested
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observable to the TestRouteResultInner object