### Question:
CalculateService { public static boolean contains(Pattern patternValue, String referenceValue, String currentValue) { if (currentValue == null) { return false; } if (patternValue == null) { return currentValue.contains(referenceValue); } return patternValue.matcher(currentValue).find(); } private  CalculateService(); static boolean contains(Pattern patternValue, String referenceValue, String currentValue); static boolean equal(Pattern patternValue, String referenceValue, String currentValue); static boolean startsWith(Pattern patternValue, String referenceValue, String currentValue); static boolean endsWith(Pattern patternValue, String referenceValue, String currentValue);  }### Answer:
@Test public void checkSimpleContainsOk() { assertThat(CalculateService.contains(null, "to", "toto")).isTrue(); }
@Test public void checkSimpleContainsReturnsFalseIfCurrentValueIsNull() { assertThat(CalculateService.contains(Pattern.compile(".*"), "to", null)).isFalse(); }
@Test public void checkSimpleContainsNok() { assertThat(CalculateService.contains(null, "toto", "ecole")).isFalse(); }
@Test public void checkPatternContainsOk() { assertThat(CalculateService.contains(Pattern.compile("[to]*"), null, "toto")).isTrue(); }
@Test public void checkPatternContainsNok() { assertThat(CalculateService.contains(Pattern.compile("[ta]*]"), null, "tot")).isFalse(); }