### Question:
ParseBooleanOriginal { public int process() { _input = _input.replaceAll(" ", ""); _input = _input.replaceAll("!1", "0"); _input = _input.replaceAll("!0", "1"); Matcher m = p.matcher(_input); if(m.find()) { _input = _input.substring(1,_input.length()-1); } Matcher m1 = p1.matcher(_input); Matcher m2 = p2.matcher(_input); if(m1.find() || m2.find()) { return 1; } Matcher m4 = p4.matcher(_input); String foundInnerLogic; String parsed; while (m4.find()) { foundInnerLogic = m4.group(); if(foundInnerLogic != null){ parsed = parseInnerLogic(foundInnerLogic); String matched = foundInnerLogic; _input = _input.replace(matched, parsed); _input = _input.replace("!0", "1"); _input = _input.replace("!1", "0"); m4 = p4.matcher(_input); } } _input = parseInnerLogic(_input); return Integer.parseInt(_input); } ParseBooleanOriginal(String input); int process(); static void main(String[] args);  }### Answer:
@Test public void test3() { String input = "0"; ParseBooleanOriginal tester = new ParseBooleanOriginal(input); int testResults = tester.process(); assertEquals("Result",0, testResults ); }
@Test public void test4() { String input = "0 * 1 * 1"; ParseBooleanOriginal tester = new ParseBooleanOriginal(input); int testResults = tester.process(); assertEquals("Result",0, testResults ); }
@Test public void test5() { String input = "(1+0)"; ParseBooleanOriginal tester = new ParseBooleanOriginal(input); int testResults = tester.process(); assertEquals("Result",1, testResults ); }
@Test public void test6() { String input = "!0 * 0 + 1"; ParseBooleanOriginal tester = new ParseBooleanOriginal(input); int testResults = tester.process(); assertEquals("Result",1, testResults ); }
@Test public void test7() { String input = "(0+1) * (1+0)"; ParseBooleanOriginal tester = new ParseBooleanOriginal(input); int testResults = tester.process(); assertEquals("Result",1, testResults ); }
@Test public void test8() { String input = "((0+0+(1+!1+!(0 + !(0*1+0*1*1+1*0)+1)+0*1)+1*0*0)+0*1)"; ParseBooleanOriginal tester = new ParseBooleanOriginal(input); int testResults = tester.process(); assertEquals("Result",1, testResults ); }
@Test public void test1() { String input = "(1+0*1)"; ParseBooleanOriginal tester = new ParseBooleanOriginal(input); int testResults = tester.process(); assertEquals("Result",1, testResults ); }
@Test public void test2() { String input = "(!0)"; ParseBooleanOriginal tester = new ParseBooleanOriginal(input); int testResults = tester.process(); assertEquals("Result",1, testResults ); }