@@ -80,7 +80,7 @@ private ConnectionInfo connectToServerWithOptions(@NotNull String options) throw
8080
8181 private void assertCanConnectToServerThatHasKeyType (@ NotNull String keyPath , String keyType ) throws IOException {
8282 ConnectionInfo info = connectToServerWithOptions ("-h " + keyPath );
83- assertThat (keyType , is (info . serverHostKeyAlgorithm ));
83+ assertThat (info . serverHostKeyAlgorithm , is (keyType ));
8484 }
8585
8686 private void canConnectWithPubkey (String keyFilename ) throws Exception {
@@ -159,7 +159,7 @@ public void connectToEd25519Host() throws Exception {
159159
160160 private void assertCanConnectToServerWithKex (@ NotNull String kexType ) throws IOException {
161161 ConnectionInfo info = connectToServerWithOptions ("-oKexAlgorithms=" + kexType );
162- assertThat (kexType , is (info . keyExchangeAlgorithm ));
162+ assertThat (info . keyExchangeAlgorithm , is (kexType ));
163163 }
164164
165165 @ Test
@@ -230,8 +230,8 @@ public void canConnectWithKexMlKem768X25519() throws Exception {
230230
231231 private void assertCanConnectToServerWithCipher (@ NotNull String ciphers ) throws IOException {
232232 ConnectionInfo info = connectToServerWithOptions ("-oCiphers=" + ciphers );
233- assertThat (ciphers , is (info . clientToServerCryptoAlgorithm ));
234- assertThat (ciphers , is (info . serverToClientCryptoAlgorithm ));
233+ assertThat (info . clientToServerCryptoAlgorithm , is (ciphers ));
234+ assertThat (info . serverToClientCryptoAlgorithm , is (ciphers ));
235235 }
236236
237237 @ Test
@@ -275,9 +275,9 @@ public void canConnectWithCipherChaCha20Poly1305() throws Exception {
275275 }
276276
277277 private void assertCanConnectToServerWithMac (@ NotNull String macs ) throws IOException {
278- ConnectionInfo info = connectToServerWithOptions ("-oMACs=" + macs );
279- assertThat (macs , is (info . clientToServerMACAlgorithm ));
280- assertThat (macs , is (info . serverToClientMACAlgorithm ));
278+ ConnectionInfo info = connectToServerWithOptions ("-oCiphers=aes128-ctr - oMACs=" + macs );
279+ assertThat (info . clientToServerMACAlgorithm , is (macs ));
280+ assertThat (info . serverToClientMACAlgorithm , is (macs ));
281281 }
282282
283283 @ Test
@@ -324,15 +324,15 @@ public void canConnectWithCompression() throws Exception {
324324 }
325325
326326 ConnectionInfo info = c .getConnectionInfo ();
327- assertThat ("zlib@openssh.com" , is ( info . clientToServerCompressionAlgorithm ));
328- assertThat ("zlib@openssh.com" , is ( info . serverToClientCompressionAlgorithm ));
327+ assertThat (info . clientToServerCompressionAlgorithm , is ( "zlib@openssh.com" ));
328+ assertThat (info . serverToClientCompressionAlgorithm , is ( "zlib@openssh.com" ));
329329 }
330330 }
331331 }
332332
333333 private void canConnectWithHostKeyAlgorithm (String keyPath , String hostKeyAlgorithm ) throws Exception {
334334 ConnectionInfo info = connectToServerWithOptions ("-h " + keyPath + " -oHostKeyAlgorithms=" + hostKeyAlgorithm );
335- assertThat (hostKeyAlgorithm , is (info . serverHostKeyAlgorithm ));
335+ assertThat (info . serverHostKeyAlgorithm , is (hostKeyAlgorithm ));
336336 }
337337
338338 @ Test
0 commit comments