diff --git a/src/test/java/com/hierynomus/smbj/testing/StubAuthenticator.java b/src/test/java/com/hierynomus/smbj/testing/StubAuthenticator.java index bb197a10..e6cc8f41 100644 --- a/src/test/java/com/hierynomus/smbj/testing/StubAuthenticator.java +++ b/src/test/java/com/hierynomus/smbj/testing/StubAuthenticator.java @@ -26,33 +26,33 @@ import com.hierynomus.spnego.RawToken; public class StubAuthenticator implements Authenticator { - public static class Factory implements com.hierynomus.protocol.commons.Factory.Named { + public static class Factory implements com.hierynomus.protocol.commons.Factory.Named { + + @Override + public String getName() { + return "stub"; + } + + @Override + public StubAuthenticator create() { + return new StubAuthenticator(); + } + } @Override - public String getName() { - return "stub"; + public void init(SmbConfig config) { } @Override - public StubAuthenticator create() { - return new StubAuthenticator(); + public boolean supports(AuthenticationContext context) { + return true; } - } - - @Override - public void init(SmbConfig config) { - - } - @Override - public boolean supports(AuthenticationContext context) { - return true; - } - - @Override - public AuthenticateResponse authenticate(AuthenticationContext context, byte[] gssToken, ConnectionContext connectionContext) throws IOException { - AuthenticateResponse resp = new AuthenticateResponse(new RawToken(new byte[0])); - resp.setSessionKey(ByteArrayUtils.parseHex("09921d4431b171b977370bf8910900f9")); - return resp; - } + @Override + public AuthenticateResponse authenticate(AuthenticationContext context, byte[] gssToken, + ConnectionContext connectionContext) throws IOException { + AuthenticateResponse resp = new AuthenticateResponse(new RawToken(new byte[0])); + resp.setSessionKey(ByteArrayUtils.parseHex("09921d4431b171b977370bf8910900f9")); + return resp; + } } diff --git a/src/test/java/com/hierynomus/smbj/testing/StubTransportLayerFactory.java b/src/test/java/com/hierynomus/smbj/testing/StubTransportLayerFactory.java index 5ff7fd16..be01dc8b 100644 --- a/src/test/java/com/hierynomus/smbj/testing/StubTransportLayerFactory.java +++ b/src/test/java/com/hierynomus/smbj/testing/StubTransportLayerFactory.java @@ -57,7 +57,7 @@ private static class StubTransportLayer, P extends Packe this.receiver = receiver; if (this.receiver instanceof Connection) { ((Connection) this.receiver).setMessageConverter(new StubMessageConverter()); - } + } this.processPacket = processPacket; }