### Question:
InitialSubstringMatcher implements Matcher { @Override public boolean matches(String s1, String s2) { if (s1 == null && s2 == null) return true; if ((s1.length() > prefixSize) && (s2.length() > prefixSize )){ return s1.substring(0, prefixSize).equals(s2.substring(0, prefixSize)); } return false; }  @Override int getCost(); @Override boolean matches(String s1, String s2); @Override boolean isExact(); @Override String getExecutionReport(); int getPrefixSize(); void setPrefixSize(int prefixSize); static void main(String[] args); static int COST; public int prefixSize; }### Answer:
@Test public void matchBlanks() { InitialSubstringMatcher matcher = new InitialSubstringMatcher(); assertFalse(matcher.matches("", "")); assertFalse(matcher.matches("", "hello")); }
@Test public void exactMatch () throws Exception { Matcher matcher = new InitialSubstringMatcher(); assertTrue(matcher.matches("2012", "2012")); }