### Question:
ZxtmNameHelper { public static Integer stripAccountIdFromZxtmName(String zxtmName) throws NumberFormatException, ArrayIndexOutOfBoundsException { return Integer.valueOf(zxtmName.split("_")[0]); }  static Integer stripAccountIdFromZxtmName(String zxtmName); static Integer stripLbIdFromZxtmName(String zxtmName); static Map<Integer, Integer> stripLbIdAndAccountIdFromZxtmName(List<String> loadBalancerNames); static Map<Integer, Integer> stripLbIdAndAccountIdFromZxtmName(Collection<LoadBalancerNameMap> loadBalancerNameMaps); static final Log LOG; }### Answer:
@Test public void shouldReturnAccountIdFromZxtmName() { String zxtmName = "1234_56"; Integer accountId = ZxtmNameHelper.stripAccountIdFromZxtmName(zxtmName); Assert.assertEquals(new Integer(1234), accountId); }
@Test(expected = NumberFormatException.class) public void shouldThrowNumberFormatExceptionWhenStrippingAccountIdFromBadName() { String badZxtmName = "Evil_load_balancer_name"; ZxtmNameHelper.stripAccountIdFromZxtmName(badZxtmName); }