### Question:
OpenPgpApiHelper { public static String buildUserId(Identity identity) { StringBuilder sb = new StringBuilder(); String name = identity.getName(); if (!TextUtils.isEmpty(name)) { sb.append(name).append(" "); } sb.append("<").append(identity.getEmail()).append(">"); return sb.toString(); }  static String buildUserId(Identity identity);  }### Answer:
@Test public void buildUserId_withName_shouldCreateOpenPgpAccountName() { Identity identity = new Identity(); identity.setEmail("user@domain.com"); identity.setName("Name"); String result = OpenPgpApiHelper.buildUserId(identity); assertEquals("Name <user@domain.com>", result); }
@Test public void buildUserId_withoutName_shouldCreateOpenPgpAccountName() { Identity identity = new Identity(); identity.setEmail("user@domain.com"); String result = OpenPgpApiHelper.buildUserId(identity); assertEquals("<user@domain.com>", result); }