2727/** Tests for {@link BinaryLog}. */
2828@ RunWith (JUnit4 .class )
2929public final class BinaryLogTest {
30- private static final BinaryLog NONE = new Builder ().build ();
3130 private static final BinaryLog HEADER_FULL = new Builder ().header (Integer .MAX_VALUE ).build ();
3231 private static final BinaryLog HEADER_256 = new Builder ().header (256 ).build ();
3332 private static final BinaryLog MSG_FULL = new Builder ().msg (Integer .MAX_VALUE ).build ();
@@ -73,7 +72,7 @@ public void configBinLog_method() throws Exception {
7372
7473 @ Test
7574 public void configBinLog_method_absent () throws Exception {
76- assertEquals ( NONE , new FactoryImpl ("p.s/m" ).getLog ("p.s/absent" ));
75+ assertNull ( new FactoryImpl ("p.s/m" ).getLog ("p.s/absent" ));
7776 }
7877
7978 @ Test
@@ -95,7 +94,7 @@ public void configBinLog_service() throws Exception {
9594
9695 @ Test
9796 public void configBinLog_service_absent () throws Exception {
98- assertEquals ( NONE , new FactoryImpl ("p.s/*" ).getLog ("p.other/m" ));
97+ assertNull ( new FactoryImpl ("p.s/*" ).getLog ("p.other/m" ));
9998 }
10099
101100 @ Test
@@ -157,7 +156,7 @@ public void configBinLog_multiConfig_noGlobal() throws Exception {
157156 "package.both256/*{h:256;m:256},"
158157 + "package.service1/both128{h:128;m:128},"
159158 + "package.service2/method_messageOnly{m}" );
160- assertEquals ( NONE , factory .getLog ("otherpackage.service/method" ));
159+ assertNull ( factory .getLog ("otherpackage.service/method" ));
161160
162161 assertEquals (BOTH_256 , factory .getLog ("package.both256/method1" ));
163162 assertEquals (BOTH_256 , factory .getLog ("package.both256/method2" ));
@@ -166,11 +165,11 @@ public void configBinLog_multiConfig_noGlobal() throws Exception {
166165 assertEquals (
167166 new Builder ().header (128 ).msg (128 ).build (), factory .getLog ("package.service1/both128" ));
168167 // no global config in effect
169- assertEquals ( NONE , factory .getLog ("package.service1/absent" ));
168+ assertNull ( factory .getLog ("package.service1/absent" ));
170169
171170 assertEquals (MSG_FULL , factory .getLog ("package.service2/method_messageOnly" ));
172171 // no global config in effect
173- assertEquals ( NONE , factory .getLog ("package.service2/absent" ));
172+ assertNull ( factory .getLog ("package.service2/absent" ));
174173 }
175174
176175 @ Test
0 commit comments