junit.framework.ComparisonFailure: expected:<user@e[]mail.com > but was:<user@e[ee]mail.com >

Stack Overflow | Ahmed Nu'man | 4 months ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to bernardpaulus , rafael and rafael . Or join the community to write better ones.
  1. 0

    I want To Handle Exception In My TestClass Using Mockito Android

    Stack Overflow | 4 months ago | Ahmed Nu'man
    junit.framework.ComparisonFailure: expected:<user@e[]mail.com > but was:<user@e[ee]mail.com >
  2. 0
    samebug tip
    You've got a kotlin TODO, fix it :)
  3. 0
    samebug tip
    CertStore.getCertificates() returns a HashSet, and this doesn't guarantee that the certificates will come ordered as desired, so you might have to use a Collection.toArray() and order them by serial number to be sure which one is which.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    samebug tip
    Check if your path is correct, if it's correct already you have to register your path to the mapping configuration.
  6. 0
    samebug tip
    WireMock, until 1.5.2, only worked with keystores with the password: "password", this was fixed in 1.5.3. Another issue that causes this exception was fixed in 1.5.3 as well.

  1. bernardpaulus 2 times, last 1 week ago
  2. musketyr 2 times, last 5 months ago
  3. marcelojaf 24 times, last 12 months ago
2 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. junit.framework.ComparisonFailure

    expected:<user@e[]mail.com > but was:<user@e[ee]mail.com >

    at junit.framework.Assert.assertEquals()
  2. JUnit
    Assert.assertEquals
    1. junit.framework.Assert.assertEquals(Assert.java:85)
    2. junit.framework.Assert.assertEquals(Assert.java:91)
    2 frames
  3. com.zoser.android
    ParentActivityTest.testMailValidFail
    1. com.zoser.android.activities.ParentActivityTest.testMailValidFail(ParentActivityTest.java:58)
    1 frame
  4. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invoke(Native Method)
    1 frame
  5. JUnit
    ParentRunner.run
    1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    4. org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    5. org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:239)
    6. org.junit.rules.RunRules.evaluate(RunRules.java:20)
    7. org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    8. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    9. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    10. org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    11. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    12. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    13. org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    14. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    15. org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    15 frames
  6. Mockito
    MockitoJUnitRunner.run
    1. org.mockito.internal.runners.JUnit45AndHigherRunnerImpl.run(JUnit45AndHigherRunnerImpl.java:37)
    2. org.mockito.runners.MockitoJUnitRunner.run(MockitoJUnitRunner.java:62)
    2 frames
  7. JUnit
    JUnitCore.run
    1. org.junit.runners.Suite.runChild(Suite.java:128)
    2. org.junit.runners.Suite.runChild(Suite.java:27)
    3. org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    4. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    5. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    6. org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    7. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    8. org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    9. org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    10. org.junit.runner.JUnitCore.run(JUnitCore.java:115)
    10 frames
  8. android.support.test
    AndroidJUnitRunner.onStart
    1. android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:59)
    2. android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:262)
    2 frames
  9. Android Platform
    Instrumentation$InstrumentationThread.run
    1. android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1996)
    1 frame