/*
 * Copyright 2018 Symphony Communication Services, LLC.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.symphonyoss.client;

import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class SymphonyClientConfigBuilderTest
{
    @Test
    public void configTest()
    {
        SymphonyClientConfig config = SymphonyClientConfigBuilder.newBuilder()
                                                                 .withSessionAuthUrl("dummyValue-SessionAuthUrl")
                                                                 .withKeyAuthUrl("dummyValue-KeyAuthUrl")
                                                                 .withPodUrl("dummyValue-PodUrl")
                                                                 .withAgentUrl("dummyValue-AgentUrl")
			                                                     .withTrustStore("dummyValue-TrustStoreFile", "dummyValue-TrustStorePassword".toCharArray())
			                                                     .withUserCreds("dummyValue-UserEmail", "dummyValue-UserCertFile", "dummyValue-UserCertPassword".toCharArray())
			                                                     .withReceiverEmail("dummyValue-ReceiverEmail")
			                                                     .withServices(true)
			                                                     .withJMXHealthcheck(true)
			                                                     .build();

        assertEquals(config.get(SymphonyClientConfigID.SESSIONAUTH_URL), "dummyValue-SessionAuthUrl");
        assertEquals(config.get(SymphonyClientConfigID.KEYAUTH_URL), "dummyValue-KeyAuthUrl");
		assertEquals(config.get(SymphonyClientConfigID.POD_URL), "dummyValue-PodUrl");
		assertEquals(config.get(SymphonyClientConfigID.AGENT_URL), "dummyValue-AgentUrl");
		assertEquals(config.get(SymphonyClientConfigID.TRUSTSTORE_FILE), "dummyValue-TrustStoreFile");
		assertEquals(config.get(SymphonyClientConfigID.TRUSTSTORE_PASSWORD), "dummyValue-TrustStorePassword");
		assertEquals(config.get(SymphonyClientConfigID.USER_EMAIL), "dummyValue-UserEmail");
		assertEquals(config.get(SymphonyClientConfigID.USER_CERT_FILE), "dummyValue-UserCertFile");
		assertEquals(config.get(SymphonyClientConfigID.USER_CERT_PASSWORD), "dummyValue-UserCertPassword");
		assertEquals(config.get(SymphonyClientConfigID.RECEIVER_EMAIL), "dummyValue-ReceiverEmail");
		assertEquals(config.get(SymphonyClientConfigID.DISABLE_SERVICES), String.valueOf(false));
		assertEquals(config.get(SymphonyClientConfigID.HEALTHCHECK_JMX_ENABLED), String.valueOf(true));
	}
}

@@ -1301,27 +1301,36 @@
 -AgentUrl%22)%0A
-%09%09%09
+            
             
@@ -1454,35 +1454,44 @@
 .toCharArray())%0A
-%09%09%09
+            
                 
@@ -1638,19 +1638,28 @@
 rray())%0A
-%09%09%09
+            
         
@@ -1750,19 +1750,17 @@
 Email%22)%0A
-%09%09%09
+ 
         
@@ -1800,24 +1800,35 @@
             
+           
 .withService
@@ -1831,27 +1831,36 @@
 vices(true)%0A
-%09%09%09
+            
             
@@ -1930,11 +1930,20 @@
 ue)%0A
-%09%09%09
+            
     
@@ -2196,26 +2196,32 @@
 yAuthUrl%22);%0A
-%09%09
+        
 assertEquals
@@ -2283,26 +2283,32 @@
 e-PodUrl%22);%0A
-%09%09
+        
 assertEquals
@@ -2374,26 +2374,32 @@
 AgentUrl%22);%0A
-%09%09
+        
 assertEquals
@@ -2473,34 +2473,40 @@
 ustStoreFile%22);%0A
-%09%09
+        
 assertEquals(con
@@ -2584,34 +2584,40 @@
 torePassword%22);%0A
-%09%09
+        
 assertEquals(con
@@ -2677,34 +2677,40 @@
 ue-UserEmail%22);%0A
-%09%09
+        
 assertEquals(con
@@ -2781,26 +2781,32 @@
 CertFile%22);%0A
-%09%09
+        
 assertEquals
@@ -2889,26 +2889,32 @@
 Password%22);%0A
-%09%09
+        
 assertEquals
@@ -2994,18 +2994,24 @@
 mail%22);%0A
-%09%09
+        
 assertEq
@@ -3096,10 +3096,16 @@
 ));%0A
-%09%09
+        
 asse
@@ -3200,9 +3200,12 @@
 ));%0A
-%09
+    
 %7D%0A%7D%0A

Fix whitespace