class IsRotationUsingIsSubstring {

  public boolean check(String s1, String s2) {
    validateInput(s1, s2);

    if (haveSameLength(s1, s2)) {
      String s1s1 = s1 + s1;
      return isSubstring(s1s1, s2);
    }
    return false;
  }

}