@Test @SuppressWarnings("deprecation") public void testConvertStringTypeMethodWithMatcher() { MatchType matchType = target.convert("httpmethod=get"); assertThat(matchType).isNotNull(); assertThat(matchType.getType()).isEqualByComparingTo(RateLimitType.HTTPMETHOD); assertThat(matchType.getMatcher()).isEqualTo("get"); }
@Override public MatchType convert(@NotNull String type) { if (type.contains(DELIMITER)) { String[] matchType = type.split(DELIMITER); return new MatchType(RateLimitType.valueOf(matchType[0].toUpperCase()), matchType[1]); } return new MatchType(RateLimitType.valueOf(type.toUpperCase()), null); }
StringToMatchTypeConverter implements Converter<String, MatchType> { @Override public MatchType convert(@NotNull String type) { if (type.contains(DELIMITER)) { String[] matchType = type.split(DELIMITER); return new MatchType(RateLimitType.valueOf(matchType[0].toUpperCase()), matchType[1]); } return new MatchType(RateLimitType.valueOf(type.toUpperCase()), null); } }
StringToMatchTypeConverter implements Converter<String, MatchType> { @Override public MatchType convert(@NotNull String type) { if (type.contains(DELIMITER)) { String[] matchType = type.split(DELIMITER); return new MatchType(RateLimitType.valueOf(matchType[0].toUpperCase()), matchType[1]); } return new MatchType(RateLimitType.valueOf(type.toUpperCase()), null); }  }
StringToMatchTypeConverter implements Converter<String, MatchType> { @Override public MatchType convert(@NotNull String type) { if (type.contains(DELIMITER)) { String[] matchType = type.split(DELIMITER); return new MatchType(RateLimitType.valueOf(matchType[0].toUpperCase()), matchType[1]); } return new MatchType(RateLimitType.valueOf(type.toUpperCase()), null); }  @Override MatchType convert(@NotNull String type); }
StringToMatchTypeConverter implements Converter<String, MatchType> { @Override public MatchType convert(@NotNull String type) { if (type.contains(DELIMITER)) { String[] matchType = type.split(DELIMITER); return new MatchType(RateLimitType.valueOf(matchType[0].toUpperCase()), matchType[1]); } return new MatchType(RateLimitType.valueOf(type.toUpperCase()), null); }  @Override MatchType convert(@NotNull String type);  }