Skip to content

Instantly share code, notes, and snippets.

@anuvrat
Created August 31, 2015 16:20
Show Gist options
  • Save anuvrat/0cae0722a5204eec903e to your computer and use it in GitHub Desktop.
Save anuvrat/0cae0722a5204eec903e to your computer and use it in GitHub Desktop.
public static void main(String args[]) {
final List<String> test1 = Lists.newArrayList(" name : Alice",
"country: US",
"email:[email protected]");
System.out.println(parsePerson(test1));
final List<String> test2 = Lists.newArrayList(" name : Bob",
" locale: de_DE",
"email:[email protected]");
System.out.println(parsePerson(test2));
final List<String> test3 = Lists.newArrayList(" name : Bob",
" locale: de_DE",
"emailAddress:[email protected]"); // incorrect key
System.out.println(parsePerson(test3));
final List<String> test4 = Lists.newArrayList(" nme : Bob", // incorrect key
" locale: de_DE",
"emailAddress:[email protected]");
System.out.println(parsePerson(test4));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment