### Question:
LocalMap implements Sc2ApiSerializable<Sc2Api.LocalMap> { public static LocalMap of(Path localMapPath, byte[] localMapDataInBytes) { validatePath(localMapPath); validateDataInBytes(localMapDataInBytes); return new LocalMap(localMapPath, localMapDataInBytes); } private  LocalMap(Path path); private  LocalMap(byte[] dataInBytes); private  LocalMap(Path path, byte[] dataInBytes); static LocalMap of(Path localMapPath, byte[] localMapDataInBytes); static LocalMap of(Path localMapPath); static LocalMap of(byte[] localMapDataInBytes); @Override Sc2Api.LocalMap toSc2Api(); Optional<Path> getPath(); Optional<byte[]> getDataInBytes(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test void throwsExceptionWhenAnyOfArgumentInFactoryMethodIsNull() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> LocalMap.of((Path) nothing())) .withMessage("path is required"); assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> LocalMap.of((byte[]) nothing())) .withMessage("data in bytes is required"); assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> LocalMap.of(nothing(), DATA_IN_BYTES)) .withMessage("path is required"); assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> LocalMap.of(Paths.get(LOCAL_MAP_PATH), nothing())) .withMessage("data in bytes is required"); }
@Test void throwsExceptionWhenPathLengthIsExceeded() { Path tooLongPath = Paths.get(String.join("", nCopies(261, String.valueOf('a')))); assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> LocalMap.of(tooLongPath)) .withMessage("Maximum length of path (260) exceeded. Actual was 261."); assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> LocalMap.of(tooLongPath, DATA_IN_BYTES)) .withMessage("Maximum length of path (260) exceeded. Actual was 261."); }