@Test void testBinaryMetadata() { final String mimeType = "text/plain"; final Map<String, List<String>> hints = singletonMap("key", asList("val1", "val2")); final BinaryMetadata binary = BinaryMetadata.builder(identifier).mimeType(mimeType).hints(hints).build(); assertEquals(identifier, binary.getIdentifier(), "Identifier did not match"); assertEquals(of(mimeType), binary.getMimeType(), "MimeType did not match"); assertEquals(hints, binary.getHints(), "hints did not match"); }
private BinaryMetadata(final IRI identifier, final String mimeType, final Map<String, List<String>> hints) { this.identifier = requireNonNull(identifier, "Identifier may not be null!"); this.mimeType = mimeType; this.hints = requireNonNull(hints, "Hints may not be null!"); }
BinaryMetadata { private BinaryMetadata(final IRI identifier, final String mimeType, final Map<String, List<String>> hints) { this.identifier = requireNonNull(identifier, "Identifier may not be null!"); this.mimeType = mimeType; this.hints = requireNonNull(hints, "Hints may not be null!"); } }
BinaryMetadata { private BinaryMetadata(final IRI identifier, final String mimeType, final Map<String, List<String>> hints) { this.identifier = requireNonNull(identifier, "Identifier may not be null!"); this.mimeType = mimeType; this.hints = requireNonNull(hints, "Hints may not be null!"); } private  BinaryMetadata(final IRI identifier, final String mimeType, final Map<String, List<String>> hints); }
BinaryMetadata { private BinaryMetadata(final IRI identifier, final String mimeType, final Map<String, List<String>> hints) { this.identifier = requireNonNull(identifier, "Identifier may not be null!"); this.mimeType = mimeType; this.hints = requireNonNull(hints, "Hints may not be null!"); } private  BinaryMetadata(final IRI identifier, final String mimeType, final Map<String, List<String>> hints); IRI getIdentifier(); Optional<String> getMimeType(); Map<String, List<String>> getHints(); static Builder builder(final IRI identifier); }
BinaryMetadata { private BinaryMetadata(final IRI identifier, final String mimeType, final Map<String, List<String>> hints) { this.identifier = requireNonNull(identifier, "Identifier may not be null!"); this.mimeType = mimeType; this.hints = requireNonNull(hints, "Hints may not be null!"); } private  BinaryMetadata(final IRI identifier, final String mimeType, final Map<String, List<String>> hints); IRI getIdentifier(); Optional<String> getMimeType(); Map<String, List<String>> getHints(); static Builder builder(final IRI identifier);  }