kirklund commented on a change in pull request #7008:
URL: https://github.com/apache/geode/pull/7008#discussion_r734083632



##########
File path: 
geode-core/src/test/java/org/apache/geode/cache/client/internal/ClientSideHandshakeImplTest.java
##########
@@ -0,0 +1,214 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
+ * agreements. See the NOTICE file distributed with this work for additional 
information regarding
+ * copyright ownership. The ASF licenses this file to You 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.apache.geode.cache.client.internal;
+
+
+import static 
org.apache.geode.distributed.ConfigurationProperties.CONFLATE_EVENTS;
+import static 
org.apache.geode.distributed.ConfigurationProperties.SECURITY_CLIENT_AUTH_INIT;
+import static 
org.apache.geode.internal.cache.tier.CommunicationMode.ClientToServer;
+import static 
org.apache.geode.internal.cache.tier.CommunicationMode.GatewayToGateway;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.Socket;
+import java.util.Properties;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.mockito.junit.MockitoJUnit;
+import org.mockito.junit.MockitoRule;
+import org.mockito.quality.Strictness;
+
+import org.apache.geode.DataSerializer;
+import org.apache.geode.LogWriter;
+import org.apache.geode.cache.client.ServerRefusedConnectionException;
+import org.apache.geode.distributed.DistributedMember;
+import org.apache.geode.distributed.internal.DistributionManager;
+import org.apache.geode.distributed.internal.InternalDistributedSystem;
+import org.apache.geode.distributed.internal.ServerLocation;
+import 
org.apache.geode.distributed.internal.membership.InternalDistributedMember;
+import org.apache.geode.internal.HeapDataOutputStream;
+import org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID;
+import org.apache.geode.internal.logging.InternalLogWriter;
+import org.apache.geode.internal.security.SecurityService;
+import org.apache.geode.internal.serialization.BufferDataOutputStream;
+import org.apache.geode.internal.serialization.KnownVersion;
+import org.apache.geode.internal.tcp.ByteBufferInputStream;
+
+public class ClientSideHandshakeImplTest {
+  private ClientProxyMembershipID proxyId;
+  private InternalDistributedSystem system;
+  private SecurityService securityService;
+
+  private Connection connection;
+  private Properties properties;
+  private ServerLocation member;
+  private Properties securityproperties;
+  private Socket socket;
+  private BufferDataOutputStream outputStream;
+  private ByteBufferInputStream inputStream;
+  private DistributionManager distributionManager;
+  private InternalDistributedMember internalDistributedMember;
+
+  private static final byte REPLY_REFUSED = (byte) 60;
+  private static final byte REPLY_INVALID = (byte) 61;
+
+  @Rule
+  public MockitoRule mockitoRule = 
MockitoJUnit.rule().strictness(Strictness.STRICT_STUBS);
+
+  @Before
+  public void setUp() throws Exception {
+    proxyId = mock(ClientProxyMembershipID.class);
+    system = mock(InternalDistributedSystem.class);
+    securityService = mock(SecurityService.class);
+    connection = mock(Connection.class);
+    properties = mock(Properties.class);
+    member = mock(ServerLocation.class);
+    securityproperties = mock(Properties.class);

Review comment:
       [comment] Properties is safe to use without having to do any mocking 
since it's basically just a map of Strings.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to