java.rmi.UnexpectedException Java Examples

The following examples show how to use java.rmi.UnexpectedException. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Util.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/**
 * Wraps an exception thrown by an implementation
 * method.  It returns the corresponding client-side exception.
 * @param orig the exception to wrap.
 * @return the wrapped exception.
 */
public RemoteException wrapException(Throwable orig)
{
    if (orig instanceof SystemException) {
        return mapSystemException((SystemException)orig);
    }

    if (orig instanceof Error) {
        return new ServerError("Error occurred in server thread",(Error)orig);
    } else if (orig instanceof RemoteException) {
        return new ServerException("RemoteException occurred in server thread",
                                   (Exception)orig);
    } else if (orig instanceof RuntimeException) {
        throw (RuntimeException) orig;
    }

    if (orig instanceof Exception)
        return new UnexpectedException( orig.toString(), (Exception)orig );
    else
        return new UnexpectedException( orig.toString());
}
 
Example #2
Source File: ExceptionHandlerImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public Exception readException( ApplicationException ae )
{
    // Note that the exception ID is present in both ae
    // and in the input stream from ae.  The exception
    // reader must actually read the exception ID from
    // the stream.
    InputStream is = (InputStream)ae.getInputStream() ;
    String excName = ae.getId() ;
    int index = findDeclaredException( excName ) ;
    if (index < 0) {
        excName = is.read_string() ;
        Exception res = new UnexpectedException( excName ) ;
        res.initCause( ae ) ;
        return res ;
    }

    return rws[index].read( is ) ;
}
 
Example #3
Source File: Util.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Wraps an exception thrown by an implementation
 * method.  It returns the corresponding client-side exception.
 * @param orig the exception to wrap.
 * @return the wrapped exception.
 */
public RemoteException wrapException(Throwable orig)
{
    if (orig instanceof SystemException) {
        return mapSystemException((SystemException)orig);
    }

    if (orig instanceof Error) {
        return new ServerError("Error occurred in server thread",(Error)orig);
    } else if (orig instanceof RemoteException) {
        return new ServerException("RemoteException occurred in server thread",
                                   (Exception)orig);
    } else if (orig instanceof RuntimeException) {
        throw (RuntimeException) orig;
    }

    if (orig instanceof Exception)
        return new UnexpectedException( orig.toString(), (Exception)orig );
    else
        return new UnexpectedException( orig.toString());
}
 
Example #4
Source File: ExceptionHandlerImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public Exception readException( ApplicationException ae )
{
    // Note that the exception ID is present in both ae
    // and in the input stream from ae.  The exception
    // reader must actually read the exception ID from
    // the stream.
    InputStream is = (InputStream)ae.getInputStream() ;
    String excName = ae.getId() ;
    int index = findDeclaredException( excName ) ;
    if (index < 0) {
        excName = is.read_string() ;
        Exception res = new UnexpectedException( excName ) ;
        res.initCause( ae ) ;
        return res ;
    }

    return rws[index].read( is ) ;
}
 
Example #5
Source File: Util.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Wraps an exception thrown by an implementation
 * method.  It returns the corresponding client-side exception.
 * @param orig the exception to wrap.
 * @return the wrapped exception.
 */
public RemoteException wrapException(Throwable orig)
{
    if (orig instanceof SystemException) {
        return mapSystemException((SystemException)orig);
    }

    if (orig instanceof Error) {
        return new ServerError("Error occurred in server thread",(Error)orig);
    } else if (orig instanceof RemoteException) {
        return new ServerException("RemoteException occurred in server thread",
                                   (Exception)orig);
    } else if (orig instanceof RuntimeException) {
        throw (RuntimeException) orig;
    }

    if (orig instanceof Exception)
        return new UnexpectedException( orig.toString(), (Exception)orig );
    else
        return new UnexpectedException( orig.toString());
}
 
Example #6
Source File: ExceptionHandlerImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public Exception readException( ApplicationException ae )
{
    // Note that the exception ID is present in both ae
    // and in the input stream from ae.  The exception
    // reader must actually read the exception ID from
    // the stream.
    InputStream is = (InputStream)ae.getInputStream() ;
    String excName = ae.getId() ;
    int index = findDeclaredException( excName ) ;
    if (index < 0) {
        excName = is.read_string() ;
        Exception res = new UnexpectedException( excName ) ;
        res.initCause( ae ) ;
        return res ;
    }

    return rws[index].read( is ) ;
}
 
Example #7
Source File: Util.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Wraps an exception thrown by an implementation
 * method.  It returns the corresponding client-side exception.
 * @param orig the exception to wrap.
 * @return the wrapped exception.
 */
public RemoteException wrapException(Throwable orig)
{
    if (orig instanceof SystemException) {
        return mapSystemException((SystemException)orig);
    }

    if (orig instanceof Error) {
        return new ServerError("Error occurred in server thread",(Error)orig);
    } else if (orig instanceof RemoteException) {
        return new ServerException("RemoteException occurred in server thread",
                                   (Exception)orig);
    } else if (orig instanceof RuntimeException) {
        throw (RuntimeException) orig;
    }

    if (orig instanceof Exception)
        return new UnexpectedException( orig.toString(), (Exception)orig );
    else
        return new UnexpectedException( orig.toString());
}
 
Example #8
Source File: ExceptionHandlerImpl.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public Exception readException( ApplicationException ae )
{
    // Note that the exception ID is present in both ae
    // and in the input stream from ae.  The exception
    // reader must actually read the exception ID from
    // the stream.
    InputStream is = (InputStream)ae.getInputStream() ;
    String excName = ae.getId() ;
    int index = findDeclaredException( excName ) ;
    if (index < 0) {
        excName = is.read_string() ;
        Exception res = new UnexpectedException( excName ) ;
        res.initCause( ae ) ;
        return res ;
    }

    return rws[index].read( is ) ;
}
 
Example #9
Source File: Util.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Wraps an exception thrown by an implementation
 * method.  It returns the corresponding client-side exception.
 * @param orig the exception to wrap.
 * @return the wrapped exception.
 */
public RemoteException wrapException(Throwable orig)
{
    if (orig instanceof SystemException) {
        return mapSystemException((SystemException)orig);
    }

    if (orig instanceof Error) {
        return new ServerError("Error occurred in server thread",(Error)orig);
    } else if (orig instanceof RemoteException) {
        return new ServerException("RemoteException occurred in server thread",
                                   (Exception)orig);
    } else if (orig instanceof RuntimeException) {
        throw (RuntimeException) orig;
    }

    if (orig instanceof Exception)
        return new UnexpectedException( orig.toString(), (Exception)orig );
    else
        return new UnexpectedException( orig.toString());
}
 
Example #10
Source File: ExceptionHandlerImpl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public Exception readException( ApplicationException ae )
{
    // Note that the exception ID is present in both ae
    // and in the input stream from ae.  The exception
    // reader must actually read the exception ID from
    // the stream.
    InputStream is = (InputStream)ae.getInputStream() ;
    String excName = ae.getId() ;
    int index = findDeclaredException( excName ) ;
    if (index < 0) {
        excName = is.read_string() ;
        Exception res = new UnexpectedException( excName ) ;
        res.initCause( ae ) ;
        return res ;
    }

    return rws[index].read( is ) ;
}
 
Example #11
Source File: Receiver.java    From cloud-native-microservice-strangler-example with GNU General Public License v3.0 6 votes vote down vote up
@RabbitListener(queues = {"customer.update"})
public void updateCustomer(String message) throws InterruptedException, IOException {
    Profile profile = objectMapper.readValue(message, Profile.class);

    try {
        // Update the customer service for the profile
        UpdateCustomerResponse response =
                customerClient.updateCustomerResponse(profile);

        if (!response.isSuccess()) {
            String errorMsg =
                    String.format("Could not update customer from profile for %s",
                            profile.getUsername());
            log.error(errorMsg);
            throw new UnexpectedException(errorMsg);
        }
    } catch (Exception ex) {
        // Throw AMQP exception and redeliver the message
        throw new AmqpIllegalStateException("Customer service update failed", ex);
    }
}
 
Example #12
Source File: Util.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Wraps an exception thrown by an implementation
 * method.  It returns the corresponding client-side exception.
 * @param orig the exception to wrap.
 * @return the wrapped exception.
 */
public RemoteException wrapException(Throwable orig)
{
    if (orig instanceof SystemException) {
        return mapSystemException((SystemException)orig);
    }

    if (orig instanceof Error) {
        return new ServerError("Error occurred in server thread",(Error)orig);
    } else if (orig instanceof RemoteException) {
        return new ServerException("RemoteException occurred in server thread",
                                   (Exception)orig);
    } else if (orig instanceof RuntimeException) {
        throw (RuntimeException) orig;
    }

    if (orig instanceof Exception)
        return new UnexpectedException( orig.toString(), (Exception)orig );
    else
        return new UnexpectedException( orig.toString());
}
 
Example #13
Source File: ExceptionHandlerImpl.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public Exception readException( ApplicationException ae )
{
    // Note that the exception ID is present in both ae
    // and in the input stream from ae.  The exception
    // reader must actually read the exception ID from
    // the stream.
    InputStream is = (InputStream)ae.getInputStream() ;
    String excName = ae.getId() ;
    int index = findDeclaredException( excName ) ;
    if (index < 0) {
        excName = is.read_string() ;
        Exception res = new UnexpectedException( excName ) ;
        res.initCause( ae ) ;
        return res ;
    }

    return rws[index].read( is ) ;
}
 
Example #14
Source File: Exporter.java    From txtUML with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * Populates model with the diagrams to be exported
 * 
 * @throws ModelMapException
 * @throws ArrangeException
 * @throws UnknownDiagramTypeException
 * @throws UnexpectedEndException
 */
private void createModel() throws ModelMapException, ArrangeException, UnexpectedDiagramTypeException,
		UnexpectedEndException, UnexpectedException {

	for (Pair<String, DiagramExportationReport> report : layout.getReportsWithDiagramNames()) {
		String name = report.getFirst();
		DiagramExportationReport der = report.getSecond();

		// map connects the layout information to the EMF-UML model
		// informations
		ModelMapProvider map = new ModelMapProvider(URI.createFileURI(genFolder), der.getModelName());

		model.createDiagram(name, report.getSecond(), map);

	}

}
 
Example #15
Source File: VCFInfo.java    From varsim with BSD 2-Clause "Simplified" License 6 votes vote down vote up
/**
 * parse INFO field string
 * store each key value pair in a map
 * @param infoString
 */
public VCFInfo(final String infoString) throws UnexpectedException {
    this.info2Value = new HashMap<String, VCFInfoElement>();
    StringTokenizer infos = new StringTokenizer(infoString, ";");
    while (infos.hasMoreTokens()) {
        String i = infos.nextToken();
        StringTokenizer keyAndValue = new StringTokenizer(i, "=");
        String key = keyAndValue.nextToken();
        if (keyAndValue.hasMoreTokens()) {
            String value = keyAndValue.nextToken();
            this.info2Value.put(key, new VCFInfoElement(key, value));
        } else {
            //must be boolean or flag
            this.info2Value.put(key, new VCFInfoElement(Boolean.class));
        }
    }
}
 
Example #16
Source File: VCFInfo.java    From varsim with BSD 2-Clause "Simplified" License 6 votes vote down vote up
/**
 * parse comma separated value and store it
 * in proper types
 * @param id
 * @param vcfIdValue
 */
public VCFInfoElement(final String id, String vcfIdValue) throws UnexpectedException {
    this.type = getType(id);
    String[] valueArray = StringUtilities.fastSplit(vcfIdValue, ",");
    if (type == int[].class) {
        int[] nums = new int[valueArray.length];
        for (int i = 0; i < nums.length; i++) {
            nums[i] = StringUtilities.parseInt(valueArray[i]);
        }
        this.value = type.cast(nums);
    } else if (type == String[].class) {
            this.value = type.cast(valueArray);
    } else {
        throw new UnexpectedException("ERROR: only Integer and String supported for INFO field (" + id + ").");
    }
}
 
Example #17
Source File: VCFparserTest.java    From varsim with BSD 2-Clause "Simplified" License 6 votes vote down vote up
@Before
public void setup() throws UnexpectedException{
    parser = new VCFparser();
    parser.processLine("##fileformat=VCFv4.1");
    parser.processLine("##reference=src/test/resources/DuplicationTest/oneDuplicationTest.fa");
    parser.processLine("##INFO=<ID=SVLEN,Number=.,Type=Integer,Description=\"Length of variant\">");
    parser.processLine("##INFO=<ID=SVTYPE,Number=1,Type=String,Description=\"Type of structural variant\">");
    parser.processLine("##FORMAT=<ID=GT,Number=1,Type=String,Description=\"Genotype\">");
    parser.processLine("##ALT=<ID=DEL,Description=\"Deletion\">");
    parser.processLine("##ALT=<ID=DEL:ME:ALU,Description=\"Deletion of ALU element\">");
    parser.processLine("##ALT=<ID=DEL:ME:L1,Description=\"Deletion of L1 element\">");
    parser.processLine("##ALT=<ID=DUP,Description=\"Duplication\">");
    parser.processLine("##ALT=<ID=DUP:TANDEM,Description=\"Tandem Duplication\">");
    parser.processLine("##ALT=<ID=INS,Description=\"Insertion of novel sequence\">");
    parser.processLine("##ALT=<ID=INS:ME:ALU,Description=\"Insertion of ALU element\">");
    parser.processLine("##ALT=<ID=INS:ME:L1,Description=\"Insertion of L1 element\">");
    parser.processLine("##ALT=<ID=INV,Description=\"Inversion\">");
    parser.processLine("##ALT=<ID=CNV,Description=\"Copy number variable region\">");
    parser.processLine("##ALT=<ID=ITX,Description=\"Intra-chromosomal translocation\">");
    parser.processLine("##ALT=<ID=CTX,Description=\"Inter-chromosomal translocation\">");
    parser.processLine("#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	FORMAT	test");
}
 
Example #18
Source File: AegisthusLoadCaster.java    From aegisthus with Apache License 2.0 6 votes vote down vote up
private long getNumber(byte[] arg0) throws Exception {
	byte[] by = hex.decode(arg0);
	ByteBuffer bb = ByteBuffer.allocate(by.length);
	bb.put(by);
	bb.position(0);
	switch(by.length) {
	case 1:
		return (long)bb.get();
	case 2:
		return (long)bb.getShort();
	case 4:
		return (long)bb.getInt();
	case 8:
		return (long)bb.getLong();
	}
	throw new UnexpectedException("couldn't determine datatype");
}
 
Example #19
Source File: TextInputTest.java    From demo-java with MIT License 6 votes vote down vote up
/**
 * Runs a simple test verifying if the comment input is functional.
 * @throws InvalidElementStateException
 */
@org.testng.annotations.Test(dataProvider = "hardCodedBrowsers")
public void verifyCommentInputTest(String platformName,
                                   String deviceName,
                                   String platformVersion,
                                   String appiumVersion,
                                   String deviceOrientation,
                                   Method method)
        throws MalformedURLException, InvalidElementStateException, UnexpectedException {

    this.createDriver(platformName, deviceName, platformVersion, appiumVersion, deviceOrientation, method.getName());
    WebDriver driver = this.getiosDriver();

    String commentInputText = UUID.randomUUID().toString();

    GuineaPigPage page = new GuineaPigPage(driver);

    page.submitComment(commentInputText);

    Assert.assertTrue(page.getSubmittedCommentText().contains(commentInputText));
}
 
Example #20
Source File: ExceptionHandlerImpl.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
public Exception readException( ApplicationException ae )
{
    // Note that the exception ID is present in both ae
    // and in the input stream from ae.  The exception
    // reader must actually read the exception ID from
    // the stream.
    InputStream is = (InputStream)ae.getInputStream() ;
    String excName = ae.getId() ;
    int index = findDeclaredException( excName ) ;
    if (index < 0) {
        excName = is.read_string() ;
        Exception res = new UnexpectedException( excName ) ;
        res.initCause( ae ) ;
        return res ;
    }

    return rws[index].read( is ) ;
}
 
Example #21
Source File: Util.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Wraps an exception thrown by an implementation
 * method.  It returns the corresponding client-side exception.
 * @param orig the exception to wrap.
 * @return the wrapped exception.
 */
public RemoteException wrapException(Throwable orig)
{
    if (orig instanceof SystemException) {
        return mapSystemException((SystemException)orig);
    }

    if (orig instanceof Error) {
        return new ServerError("Error occurred in server thread",(Error)orig);
    } else if (orig instanceof RemoteException) {
        return new ServerException("RemoteException occurred in server thread",
                                   (Exception)orig);
    } else if (orig instanceof RuntimeException) {
        throw (RuntimeException) orig;
    }

    if (orig instanceof Exception)
        return new UnexpectedException( orig.toString(), (Exception)orig );
    else
        return new UnexpectedException( orig.toString());
}
 
Example #22
Source File: ExceptionHandlerImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public Exception readException( ApplicationException ae )
{
    // Note that the exception ID is present in both ae
    // and in the input stream from ae.  The exception
    // reader must actually read the exception ID from
    // the stream.
    InputStream is = (InputStream)ae.getInputStream() ;
    String excName = ae.getId() ;
    int index = findDeclaredException( excName ) ;
    if (index < 0) {
        excName = is.read_string() ;
        Exception res = new UnexpectedException( excName ) ;
        res.initCause( ae ) ;
        return res ;
    }

    return rws[index].read( is ) ;
}
 
Example #23
Source File: Util.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Wraps an exception thrown by an implementation
 * method.  It returns the corresponding client-side exception.
 * @param orig the exception to wrap.
 * @return the wrapped exception.
 */
public RemoteException wrapException(Throwable orig)
{
    if (orig instanceof SystemException) {
        return mapSystemException((SystemException)orig);
    }

    if (orig instanceof Error) {
        return new ServerError("Error occurred in server thread",(Error)orig);
    } else if (orig instanceof RemoteException) {
        return new ServerException("RemoteException occurred in server thread",
                                   (Exception)orig);
    } else if (orig instanceof RuntimeException) {
        throw (RuntimeException) orig;
    }

    if (orig instanceof Exception)
        return new UnexpectedException( orig.toString(), (Exception)orig );
    else
        return new UnexpectedException( orig.toString());
}
 
Example #24
Source File: ExceptionHandlerImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public Exception readException( ApplicationException ae )
{
    // Note that the exception ID is present in both ae
    // and in the input stream from ae.  The exception
    // reader must actually read the exception ID from
    // the stream.
    InputStream is = (InputStream)ae.getInputStream() ;
    String excName = ae.getId() ;
    int index = findDeclaredException( excName ) ;
    if (index < 0) {
        excName = is.read_string() ;
        Exception res = new UnexpectedException( excName ) ;
        res.initCause( ae ) ;
        return res ;
    }

    return rws[index].read( is ) ;
}
 
Example #25
Source File: Util.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/**
 * Wraps an exception thrown by an implementation
 * method.  It returns the corresponding client-side exception.
 * @param orig the exception to wrap.
 * @return the wrapped exception.
 */
public RemoteException wrapException(Throwable orig)
{
    if (orig instanceof SystemException) {
        return mapSystemException((SystemException)orig);
    }

    if (orig instanceof Error) {
        return new ServerError("Error occurred in server thread",(Error)orig);
    } else if (orig instanceof RemoteException) {
        return new ServerException("RemoteException occurred in server thread",
                                   (Exception)orig);
    } else if (orig instanceof RuntimeException) {
        throw (RuntimeException) orig;
    }

    if (orig instanceof Exception)
        return new UnexpectedException( orig.toString(), (Exception)orig );
    else
        return new UnexpectedException( orig.toString());
}
 
Example #26
Source File: ExceptionHandlerImpl.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
public Exception readException( ApplicationException ae )
{
    // Note that the exception ID is present in both ae
    // and in the input stream from ae.  The exception
    // reader must actually read the exception ID from
    // the stream.
    InputStream is = (InputStream)ae.getInputStream() ;
    String excName = ae.getId() ;
    int index = findDeclaredException( excName ) ;
    if (index < 0) {
        excName = is.read_string() ;
        Exception res = new UnexpectedException( excName ) ;
        res.initCause( ae ) ;
        return res ;
    }

    return rws[index].read( is ) ;
}
 
Example #27
Source File: Util.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Wraps an exception thrown by an implementation
 * method.  It returns the corresponding client-side exception.
 * @param orig the exception to wrap.
 * @return the wrapped exception.
 */
public RemoteException wrapException(Throwable orig)
{
    if (orig instanceof SystemException) {
        return mapSystemException((SystemException)orig);
    }

    if (orig instanceof Error) {
        return new ServerError("Error occurred in server thread",(Error)orig);
    } else if (orig instanceof RemoteException) {
        return new ServerException("RemoteException occurred in server thread",
                                   (Exception)orig);
    } else if (orig instanceof RuntimeException) {
        throw (RuntimeException) orig;
    }

    if (orig instanceof Exception)
        return new UnexpectedException( orig.toString(), (Exception)orig );
    else
        return new UnexpectedException( orig.toString());
}
 
Example #28
Source File: FollowLinkTest.java    From demo-java with MIT License 6 votes vote down vote up
/**
 * Runs a simple test verifying link can be followed.
 *
 * @throws InvalidElementStateException
 */
@Test(dataProvider = "hardCodedBrowsers")
public void verifyLinkTest(String platformName,
                           String deviceName,
                           String platformVersion,
                           String appiumVersion,
                           String deviceOrientation,
                           Method method)
        throws MalformedURLException, InvalidElementStateException, UnexpectedException {

    //create webdriver session
    this.createDriver(platformName, deviceName, platformVersion, appiumVersion, deviceOrientation, method.getName());
    WebDriver driver = this.getAndroidDriver();

    GuineaPigPage page = new GuineaPigPage(driver);

    page.followLink();

    Assert.assertFalse(page.isOnPage());
}
 
Example #29
Source File: FollowLinkTest.java    From demo-java with MIT License 6 votes vote down vote up
/**
 * Runs a simple test verifying link can be followed.
 *
 * @throws InvalidElementStateException
 */
@Test(dataProvider = "hardCodedBrowsers")
public void verifyLinkTest(String platformName,
                           String deviceName,
                           String platformVersion,
                           String appiumVersion,
                           String deviceOrientation,
                           Method method)
        throws MalformedURLException, InvalidElementStateException, UnexpectedException {

    //create webdriver session
    this.createDriver(platformName, deviceName, platformVersion, appiumVersion, deviceOrientation, method.getName());
    WebDriver driver = this.getiosDriver();

    GuineaPigPage page = new GuineaPigPage(driver);

    page.followLink();

    Assert.assertFalse(page.isOnPage());
}
 
Example #30
Source File: TextInputTest.java    From demo-java with MIT License 6 votes vote down vote up
/**
 * Runs a simple test verifying if the comment input is functional.
 * @throws InvalidElementStateException
 */
@org.testng.annotations.Test(dataProvider = "hardCodedBrowsers")
public void verifyCommentInputTest(String platformName,
                                   String deviceName,
                                   String platformVersion,
                                   String appiumVersion,
                                   String deviceOrientation,
                                   Method method)
        throws MalformedURLException, InvalidElementStateException, UnexpectedException {

    this.createDriver(platformName, deviceName, platformVersion, appiumVersion, deviceOrientation, method.getName());
    WebDriver driver = this.getAndroidDriver();

    String commentInputText = UUID.randomUUID().toString();

    GuineaPigPage page = new GuineaPigPage(driver);

    page.submitComment(commentInputText);

    Assert.assertTrue(page.getSubmittedCommentText().contains(commentInputText));
}