### Question:
CalculateService { public static boolean startsWith(Pattern patternValue, String referenceValue, String currentValue) { if (currentValue == null) { return false; } if (patternValue == null) { return currentValue.startsWith(referenceValue); } java.util.regex.Matcher matcher = patternValue.matcher(currentValue); return matcher.find() && 0 == matcher.start(); } 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 checkSimpleStartsWithOk() { assertThat(CalculateService.startsWith(null, "to", "toto")).isTrue(); }
@Test public void checkSimpleStartsWithReturnsFalseIfCurrentValueIsNull() { assertThat(CalculateService.startsWith(Pattern.compile(".*"), "to", null)).isFalse(); }
@Test public void checkSimpleStartsWithNok() { assertThat(CalculateService.startsWith(null, "to", "la to to")).isFalse(); }
@Test public void checkPatternStartsWithOk() { assertThat(CalculateService.startsWith(Pattern.compile("[to]*"), null, "toto")).isTrue(); }
@Test public void checkPatternStartsWithNok() { assertThat(CalculateService.startsWith(Pattern.compile("[ta]*]"), null, "tot")).isFalse(); }