### Question:
LocalRemoteRefSpec { public static List<LocalRemoteRefSpec> parse(final String remoteName, final String refspecs) { Preconditions.checkArgument(!Strings.isNullOrEmpty(remoteName)); Preconditions.checkArgument(!Strings.isNullOrEmpty(remoteName.trim())); Preconditions.checkArgument(!Strings.isNullOrEmpty(refspecs), "no refspecs provided"); Preconditions.checkArgument(!Strings.isNullOrEmpty(refspecs.trim()), "no refspecs provided"); List<String> refs = Splitter.on(';').omitEmptyStrings().trimResults().splitToList(refspecs); return refs.stream().map(spec -> LocalRemoteRefSpec.parseSingle(remoteName, spec)) .collect(Collectors.toList()); } LocalRemoteRefSpec(String remoteRef, String localRef, boolean force, boolean allChildren); String getLocal(); String getRemote(); boolean isForce(); boolean isAllChildren(); static List<LocalRemoteRefSpec> parse(final String remoteName, final String refspecs); Optional<String> mapToLocal(final @NonNull String remoteRef); Optional<String> mapToRemote(final @NonNull String local); @Override String toString();  }### Answer:
public @Test void testNullSpec() { IllegalArgumentException e = assertThrows(IllegalArgumentException.class, () -> parse(null)); assertThat(e.getMessage(), containsString("no refspecs provided")); }
public @Test void testEmptySpec() { IllegalArgumentException e = assertThrows(IllegalArgumentException.class, () -> parse(" ")); assertThat(e.getMessage(), containsString("no refspecs provided")); }