Arguments { static boolean endsWithJoinOperator(String arg) { if(arg.isEmpty()) return false; char c = arg.charAt(arg.length()-1); return c == OpObjectEquals || c == OpListPlus; }  static Parameters parse(String[] args);  }
@Test public void testEndsWithJoinOperator() throws Exception { assertFalse(Arguments.endsWithJoinOperator("--foo")); assertTrue(Arguments.endsWithJoinOperator("--bar=")); assertTrue(Arguments.endsWithJoinOperator("bar+")); assertTrue(Arguments.endsWithJoinOperator("bar=")); assertFalse(Arguments.endsWithJoinOperator("bar/")); assertFalse(Arguments.endsWithJoinOperator("bar?")); assertFalse(Arguments.endsWithJoinOperator("bar ")); }