@Test(expected = IllegalArgumentException.class) public void shouldNotAcceptNullInstancesAsSecondParameter() { isRotation.check("", null); }
public boolean check(String s1, String s2) { validateInput(s1, s2); if (haveSameLength(s1, s2)) { String s1s1 = s1 + s1; return isSubstring(s1s1, s2); } return false; }
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; } }
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; }  }
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; }  boolean check(String s1, String s2); }
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; }  boolean check(String s1, String s2);  }