From 6b1e3bf06de1327d05b8cbefcd930e5974f556d3 Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Mon, 04 Apr 2011 22:33:36 +0000
Subject: [PATCH] OpenDJ-107: Potential for leaking DB cursors in replication databases

---
 opends/tests/unit-tests-testng/src/server/org/opends/server/util/TestStaticUtils.java |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/util/TestStaticUtils.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/util/TestStaticUtils.java
index ef9d5c8..fccde2c 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/util/TestStaticUtils.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/util/TestStaticUtils.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2009 Sun Microsystems, Inc.
+ *      Portions Copyright 2011 ForgeRock AS
  */
 package org.opends.server.util;
 
@@ -138,6 +139,21 @@
   }
 
   /**
+   * Tests the {@link StaticUtils#decodeUTF8(byte[])} method.
+   *
+   * @param inputString
+   *          The input string.
+   * @throws Exception
+   *           If the test failed unexpectedly.
+   */
+  @Test(dataProvider = "getBytesTestData")
+  public void testDecodeUTF8(String inputString) throws Exception
+  {
+    final byte[] bytes = inputString.getBytes("UTF-8");
+    Assert.assertEquals(StaticUtils.decodeUTF8(bytes), inputString);
+  }
+
+  /**
    * Tests the {@link StaticUtils#getBytes(String)} method.
    *
    * @param inputString
@@ -1174,7 +1190,7 @@
    *           If the test failed unexpectedly.
    */
   @Test(dataProvider = "listsAreEqualTestData")
-  public void testListsAreEqual(List list1, List list2, boolean result)
+  public void testListsAreEqual(List<?> list1, List<?> list2, boolean result)
       throws Exception {
     Assert.assertEquals(StaticUtils.listsAreEqual(list1, list2), result);
   }

--
Gitblit v1.10.0