2626import io .split .grammar .Treatments ;
2727import io .split .telemetry .storage .InMemoryTelemetryStorage ;
2828import io .split .telemetry .storage .TelemetryStorage ;
29+ import org .junit .Assert ;
2930import org .junit .Test ;
3031import org .mockito .Mockito ;
3132
3839
3940import static org .hamcrest .Matchers .equalTo ;
4041import static org .hamcrest .Matchers .is ;
41- import static org .hamcrest .Matchers .nullValue ;
4242import static org .junit .Assert .assertThat ;
4343
4444/**
@@ -50,6 +50,7 @@ public class SplitParserTest {
5050
5151 public static final String EMPLOYEES = "employees" ;
5252 public static final String SALES_PEOPLE = "salespeople" ;
53+ public static final int CONDITIONS_UPPER_LIMIT = 50 ;
5354 private static final TelemetryStorage TELEMETRY_STORAGE = Mockito .mock (InMemoryTelemetryStorage .class );
5455
5556 @ Test
@@ -176,7 +177,7 @@ public void works_for_two_conditions() {
176177 }
177178
178179 @ Test
179- public void fails_for_long_conditions () {
180+ public void success_for_long_conditions () {
180181 SDKReadinessGates gates = new SDKReadinessGates ();
181182 SegmentCache segmentCache = new SegmentCacheInMemoryImpl ();
182183 segmentCache .updateSegment (EMPLOYEES , Stream .of ("adil" , "pato" , "trevor" ).collect (Collectors .toList ()), new ArrayList <>());
@@ -193,14 +194,14 @@ public void fails_for_long_conditions() {
193194
194195 List <Condition > conditions = Lists .newArrayList ();
195196 List <Partition > p1 = Lists .newArrayList (ConditionsTestUtil .partition ("on" , 100 ));
196- for (int i = 0 ; i < SplitParser . CONDITIONS_UPPER_LIMIT +1 ; i ++) {
197+ for (int i = 0 ; i < CONDITIONS_UPPER_LIMIT +1 ; i ++) {
197198 Condition c = ConditionsTestUtil .and (employeesMatcher , p1 );
198199 conditions .add (c );
199200 }
200201
201202 Split split = makeSplit ("first.name" , 123 , conditions , 1 );
202203
203- assertThat (parser .parse (split ), is ( nullValue () ));
204+ Assert . assertNotNull (parser .parse (split ));
204205 }
205206
206207
0 commit comments