2626@ RunWith (JUnit4 .class )
2727public final class MtlsToS2AChannelCredentialsTest {
2828 @ Test
29- public void createBuilder_nullAddress_throwsException () throws Exception {
29+ public void newBuilder_nullAddress_throwsException () throws Exception {
3030 assertThrows (
3131 IllegalArgumentException .class ,
3232 () ->
33- MtlsToS2AChannelCredentials .createBuilder (
33+ MtlsToS2AChannelCredentials .newBuilder (
3434 /* s2aAddress= */ null ,
3535 /* privateKeyPath= */ "src/test/resources/client_key.pem" ,
3636 /* certChainPath= */ "src/test/resources/client_cert.pem" ,
3737 /* trustBundlePath= */ "src/test/resources/root_cert.pem" ));
3838 }
3939
4040 @ Test
41- public void createBuilder_nullPrivateKeyPath_throwsException () throws Exception {
41+ public void newBuilder_nullPrivateKeyPath_throwsException () throws Exception {
4242 assertThrows (
4343 IllegalArgumentException .class ,
4444 () ->
45- MtlsToS2AChannelCredentials .createBuilder (
45+ MtlsToS2AChannelCredentials .newBuilder (
4646 /* s2aAddress= */ "s2a_address" ,
4747 /* privateKeyPath= */ null ,
4848 /* certChainPath= */ "src/test/resources/client_cert.pem" ,
4949 /* trustBundlePath= */ "src/test/resources/root_cert.pem" ));
5050 }
5151
5252 @ Test
53- public void createBuilder_nullCertChainPath_throwsException () throws Exception {
53+ public void newBuilder_nullCertChainPath_throwsException () throws Exception {
5454 assertThrows (
5555 IllegalArgumentException .class ,
5656 () ->
57- MtlsToS2AChannelCredentials .createBuilder (
57+ MtlsToS2AChannelCredentials .newBuilder (
5858 /* s2aAddress= */ "s2a_address" ,
5959 /* privateKeyPath= */ "src/test/resources/client_key.pem" ,
6060 /* certChainPath= */ null ,
6161 /* trustBundlePath= */ "src/test/resources/root_cert.pem" ));
6262 }
6363
6464 @ Test
65- public void createBuilder_nullTrustBundlePath_throwsException () throws Exception {
65+ public void newBuilder_nullTrustBundlePath_throwsException () throws Exception {
6666 assertThrows (
6767 IllegalArgumentException .class ,
6868 () ->
69- MtlsToS2AChannelCredentials .createBuilder (
69+ MtlsToS2AChannelCredentials .newBuilder (
7070 /* s2aAddress= */ "s2a_address" ,
7171 /* privateKeyPath= */ "src/test/resources/client_key.pem" ,
7272 /* certChainPath= */ "src/test/resources/client_cert.pem" ,
7373 /* trustBundlePath= */ null ));
7474 }
7575
7676 @ Test
77- public void createBuilder_emptyAddress_throwsException () throws Exception {
77+ public void newBuilder_emptyAddress_throwsException () throws Exception {
7878 assertThrows (
7979 IllegalArgumentException .class ,
8080 () ->
81- MtlsToS2AChannelCredentials .createBuilder (
81+ MtlsToS2AChannelCredentials .newBuilder (
8282 /* s2aAddress= */ "" ,
8383 /* privateKeyPath= */ "src/test/resources/client_key.pem" ,
8484 /* certChainPath= */ "src/test/resources/client_cert.pem" ,
8585 /* trustBundlePath= */ "src/test/resources/root_cert.pem" ));
8686 }
8787
8888 @ Test
89- public void createBuilder_emptyPrivateKeyPath_throwsException () throws Exception {
89+ public void newBuilder_emptyPrivateKeyPath_throwsException () throws Exception {
9090 assertThrows (
9191 IllegalArgumentException .class ,
9292 () ->
93- MtlsToS2AChannelCredentials .createBuilder (
93+ MtlsToS2AChannelCredentials .newBuilder (
9494 /* s2aAddress= */ "s2a_address" ,
9595 /* privateKeyPath= */ "" ,
9696 /* certChainPath= */ "src/test/resources/client_cert.pem" ,
9797 /* trustBundlePath= */ "src/test/resources/root_cert.pem" ));
9898 }
9999
100100 @ Test
101- public void createBuilder_emptyCertChainPath_throwsException () throws Exception {
101+ public void newBuilder_emptyCertChainPath_throwsException () throws Exception {
102102 assertThrows (
103103 IllegalArgumentException .class ,
104104 () ->
105- MtlsToS2AChannelCredentials .createBuilder (
105+ MtlsToS2AChannelCredentials .newBuilder (
106106 /* s2aAddress= */ "s2a_address" ,
107107 /* privateKeyPath= */ "src/test/resources/client_key.pem" ,
108108 /* certChainPath= */ "" ,
109109 /* trustBundlePath= */ "src/test/resources/root_cert.pem" ));
110110 }
111111
112112 @ Test
113- public void createBuilder_emptyTrustBundlePath_throwsException () throws Exception {
113+ public void newBuilder_emptyTrustBundlePath_throwsException () throws Exception {
114114 assertThrows (
115115 IllegalArgumentException .class ,
116116 () ->
117- MtlsToS2AChannelCredentials .createBuilder (
117+ MtlsToS2AChannelCredentials .newBuilder (
118118 /* s2aAddress= */ "s2a_address" ,
119119 /* privateKeyPath= */ "src/test/resources/client_key.pem" ,
120120 /* certChainPath= */ "src/test/resources/client_cert.pem" ,
@@ -124,7 +124,7 @@ public void createBuilder_emptyTrustBundlePath_throwsException() throws Exceptio
124124 @ Test
125125 public void build_s2AChannelCredentials_success () throws Exception {
126126 assertThat (
127- MtlsToS2AChannelCredentials .createBuilder (
127+ MtlsToS2AChannelCredentials .newBuilder (
128128 /* s2aAddress= */ "s2a_address" ,
129129 /* privateKeyPath= */ "src/test/resources/client_key.pem" ,
130130 /* certChainPath= */ "src/test/resources/client_cert.pem" ,
0 commit comments