Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via pmd by bialeckijacek
, 1 year ago
expected one element but was: <BlockStatement, BlockStatement>
via GitHub by gdhruv80
, 10 months ago
expected one element but was: <class java.lang.Double, class java.lang.String>
via GitHub by GoogleCodeExporter
, 9 months ago
expected one element but was: <██████████Activity@b23c7d10, ███████████Activity@b2461610>
via GitHub by GoogleCodeExporter
, 1 year ago
expected one element but was: <██████████Activity@b23c7d10, ███████████Activity@b2461610>
via Sonatype JIRA by Benjamin Bentmann, 1 year ago
expected one element but was: <null, null, null, null, null, ...>
via Stack Overflow by Digital-Clouds
, 2 years ago
expected one element but was: <test_mod__c, test_mod__d>
java.lang.IllegalArgumentException: expected one element but was: <BlockStatement, BlockStatement>	at com.google.common.collect.Iterators.getOnlyElement(Iterators.java:317)	at com.google.common.collect.Iterables.getOnlyElement(Iterables.java:289)	at net.sourceforge.pmd.lang.apex.rule.apexunit.ApexUnitTestClassShouldHaveAsserts.checkForAssertStatements(ApexUnitTestClassShouldHaveAsserts.java:32)	at net.sourceforge.pmd.lang.apex.rule.apexunit.ApexUnitTestClassShouldHaveAsserts.visit(ApexUnitTestClassShouldHaveAsserts.java:27)	at net.sourceforge.pmd.lang.apex.ast.ASTMethod.jjtAccept(ASTMethod.java:15)	at net.sourceforge.pmd.lang.apex.ast.AbstractApexNode.childrenAccept(AbstractApexNode.java:101)	at net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.visit(AbstractApexRule.java:132)	at net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.visit(AbstractApexRule.java:143)	at net.sourceforge.pmd.lang.apex.rule.apexunit.AbstractApexUnitTestRule.visit(AbstractApexUnitTestRule.java:30)	at net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.visitAll(AbstractApexRule.java:121)	at net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.apply(AbstractApexRule.java:115)	at net.sourceforge.pmd.RuleSet.apply(RuleSet.java:306)	at net.sourceforge.pmd.RuleSets.apply(RuleSets.java:125)	at net.sourceforge.pmd.SourceCodeProcessor.processSource(SourceCodeProcessor.java:146)	at net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:76)	at net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:43)	at net.sourceforge.pmd.processor.PmdRunnable.call(PmdRunnable.java:79)	at net.sourceforge.pmd.processor.PmdRunnable.call(PmdRunnable.java:25)	at java.util.concurrent.FutureTask.run(Unknown Source)	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)	at java.lang.Thread.run(Unknown Source)