package com.topsy.jmxproxy.jmx.tests;

import com.topsy.jmxproxy.jmx.ConnectionCredentials;
import org.junit.Test;

import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertFalse;

public class ConnectionCredentialsTest {
    @Test
    public void compareEquals() throws Exception {
        final ConnectionCredentials auth1 = new ConnectionCredentials("user", "pass");
        final ConnectionCredentials auth2 = new ConnectionCredentials("user", "pass");

        assertTrue(auth1.equals(auth2));
    }

    @Test
    public void compareNotEquals() throws Exception {
        final ConnectionCredentials auth1 = new ConnectionCredentials("user", "pass");
        final ConnectionCredentials auth2 = new ConnectionCredentials("pass", "user");

        assertFalse(auth1.equals(auth2));
    }

    @Test
    public void compareNotEqualsNull() throws Exception {
        final ConnectionCredentials auth1 = new ConnectionCredentials("user", "pass");

        assertFalse(auth1.equals(null));
    }
}

@@ -365,39 +365,63 @@
 Credentials(
+new String(
 %22user%22
+)
 , 
+new String(
 %22pass%22)
+)
 ;%0A        fi
@@ -476,39 +476,63 @@
 Credentials(
+new String(
 %22user%22
+)
 , 
+new String(
 %22pass%22)
+)
 ;%0A%0A        a
@@ -704,31 +704,55 @@
 entials(
+new String(
 %22user%22
+)
 , 
+new String(
 %22pass%22)
+)
 ;%0A      
@@ -819,23 +819,47 @@
 als(
+new String(
 %22pass%22
+)
 , 
+new String(
 %22user%22)
+)
 ;%0A%0A 
@@ -1006,33 +1006,32 @@
 Credentials auth
-1
  = new Connectio
@@ -1047,23 +1047,47 @@
 als(
+new String(
 %22user%22
+)
 , 
+new String(
 %22pass%22)
+)
 ;%0A%0A 
@@ -1101,33 +1101,32 @@
 assertFalse(auth
-1
 .equals(null));%0A

Make the test a bit less idiotic.