Repository: accumulo Updated Branches: refs/heads/master c5b8335d3 -> 8a363c3e3
ACCUMULO-2490 Correct test invocation Pair.fromEntry. Add test for non-parameterized fromEntry call Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/8a363c3e Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/8a363c3e Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/8a363c3e Branch: refs/heads/master Commit: 8a363c3e3695d8f1675b48d8308a7c512eef1b12 Parents: c5b8335 Author: Sean Busbey <bus...@cloudera.com> Authored: Sat Mar 22 02:14:09 2014 -0500 Committer: Sean Busbey <bus...@cloudera.com> Committed: Sat Mar 22 02:14:09 2014 -0500 ---------------------------------------------------------------------- .../test/java/org/apache/accumulo/core/util/PairTest.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/8a363c3e/core/src/test/java/org/apache/accumulo/core/util/PairTest.java ---------------------------------------------------------------------- diff --git a/core/src/test/java/org/apache/accumulo/core/util/PairTest.java b/core/src/test/java/org/apache/accumulo/core/util/PairTest.java index 04af1ba..b837f05 100644 --- a/core/src/test/java/org/apache/accumulo/core/util/PairTest.java +++ b/core/src/test/java/org/apache/accumulo/core/util/PairTest.java @@ -102,11 +102,15 @@ public class PairTest { public void testFromEntry() { Entry<Integer,String> entry = new SimpleImmutableEntry<Integer,String>(10, "IO"); - Pair<Object,Object> pair = Pair.fromEntry(entry); + Pair<Integer, String> pair0 = Pair.fromEntry(entry); + assertEquals(entry.getKey(), pair0.getFirst()); + assertEquals(entry.getValue(), pair0.getSecond()); + + Pair<Object,Object> pair = Pair.<Object, Object, Integer, String>fromEntry(entry); assertEquals(entry.getKey(), pair.getFirst()); assertEquals(entry.getValue(), pair.getSecond()); - Pair<Number,CharSequence> pair2 = Pair.fromEntry(entry); + Pair<Number,CharSequence> pair2 = Pair.<Number, CharSequence, Integer, String>fromEntry(entry); assertEquals(entry.getKey(), pair2.getFirst()); assertEquals(entry.getValue(), pair2.getSecond()); }