From 540720a912a4982950bd3ebfb20b281e696b24f5 Mon Sep 17 00:00:00 2001
From: zzz <zzz@mail.i2p>
Date: Fri, 5 Dec 2014 16:18:25 +0000
Subject: [PATCH] unit test fixes

---
 .../net/i2p/router/tunnel/BuildMessageTestStandalone.java  | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/router/java/test/junit/net/i2p/router/tunnel/BuildMessageTestStandalone.java b/router/java/test/junit/net/i2p/router/tunnel/BuildMessageTestStandalone.java
index dd26dd1247..1ca7caea82 100644
--- a/router/java/test/junit/net/i2p/router/tunnel/BuildMessageTestStandalone.java
+++ b/router/java/test/junit/net/i2p/router/tunnel/BuildMessageTestStandalone.java
@@ -15,6 +15,7 @@ import net.i2p.data.PublicKey;
 import net.i2p.data.TunnelId;
 import net.i2p.data.i2np.BuildRequestRecord;
 import net.i2p.data.i2np.BuildResponseRecord;
+import net.i2p.data.i2np.EncryptedBuildRecord;
 import net.i2p.data.i2np.TunnelBuildMessage;
 import net.i2p.data.i2np.TunnelBuildReplyMessage;
 import net.i2p.util.Log;
@@ -87,11 +88,11 @@ public class BuildMessageTestStandalone extends TestCase {
             long now = (ctx.clock().now() / (60l*60l*1000l)) * (60*60*1000);
             int ourSlot = -1;
 
-            byte reply[] = BuildResponseRecord.create(ctx, 0, req.readReplyKey(), req.readReplyIV(), -1);
+            EncryptedBuildRecord reply = BuildResponseRecord.create(ctx, 0, req.readReplyKey(), req.readReplyIV(), -1);
             for (int j = 0; j < TunnelBuildMessage.MAX_RECORD_COUNT; j++) {
                 if (msg.getRecord(j) == null) {
                     ourSlot = j;
-                    msg.setRecord(j, new ByteArray(reply));
+                    msg.setRecord(j, reply);
                     break;
                 }
             }
@@ -173,7 +174,7 @@ public class BuildMessageTestStandalone extends TestCase {
             hop.setReplyKey(ctx.keyGenerator().generateSessionKey());
             byte iv[] = new byte[BuildRequestRecord.IV_SIZE];
             Arrays.fill(iv, (byte)i); // consistent for repeatability
-            hop.setReplyIV(new ByteArray(iv));
+            hop.setReplyIV(iv);
             hop.setReceiveTunnelId(new TunnelId(i+1));
         }
         return cfg;
-- 
GitLab