Fixing assertion

git-svn-id: https://svn.apache.org/repos/asf/activemq/activemq-protobuf/trunk@746267 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/MessageBufferSupport.java b/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/MessageBufferSupport.java
index 44ef511..23d444e 100644
--- a/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/MessageBufferSupport.java
+++ b/activemq-protobuf/src/main/java/org/apache/activemq/protobuf/MessageBufferSupport.java
@@ -18,7 +18,7 @@
             CodedOutputStream output = new CodedOutputStream(baos);
             message.writeUnframed(output);
             Buffer rc = baos.toBuffer();
-            assert rc.length != size : "Did not write as much data as expected.";
+            assert rc.length == size : "Did not write as much data as expected.";
             return rc;
         } catch (IOException e) {
             throw new RuntimeException("Serializing to a byte array threw an IOException " + "(should never happen).", e);