test_class.declarator: rangePartHeaderSerializer = new RangePartHeaderSerializer()
test_class.modifier: private final
test_class.original_string: private final RangePartHeaderSerializer rangePartHeaderSerializer = new RangePartHeaderSerializer();
test_class.type: RangePartHeaderSerializer
test_class.var_name: rangePartHeaderSerializer
test_class.file: http/src/test/java/ro/polak/http/protocol/serializer/impl/RangePartHeaderSerializerTest.java
test_class.identifier: RangePartHeaderSerializerTest
test_case.body: @Test
      public void shouldSerializeRangeProperly() {
          Range range = new Range(333L, 1234L);
          String boundary = "BBBOOUUNNNDDAARRYY";
          String contentType = "application/pdf";
          long totalLength = 12345L;
          RangePartHeader rangePartHeader = new RangePartHeader(range, boundary, contentType, totalLength);
  
          String serialized = rangePartHeaderSerializer.serialize(rangePartHeader);
          assertThat(serialized, startsWith("--" + boundary + "\r\n"));
          assertThat(serialized, endsWith("\r\n\r\n"));
          assertThat(serialized, containsString("\r\nContent-Type: " + contentType + "\r\n"));
          assertThat(serialized, containsString("\r\nContent-Range: bytes 333-1234/12345\r\n"));
      }
test_case.class_method_signature: RangePartHeaderSerializerTest.shouldSerializeRangeProperly()
test_case.full_signature: @Test public void shouldSerializeRangeProperly()
test_case.identifier: shouldSerializeRangeProperly
test_case.invocations: serialize assertThat startsWith assertThat endsWith assertThat containsString assertThat containsString
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldSerializeRangeProperly()
focal_class.declarator: NEW_LINE = "\r\n"
focal_class.modifier: private static final
focal_class.original_string: private static final String NEW_LINE = "\r\n";
focal_class.type: String
focal_class.var_name: NEW_LINE
focal_class.declarator: DASH_DASH = "--"
focal_class.modifier: private static final
focal_class.original_string: private static final String DASH_DASH = "--";
focal_class.type: String
focal_class.var_name: DASH_DASH
focal_class.declarator: RANGE_DIGITS_LENGTH = 3
focal_class.modifier: private static final
focal_class.original_string: private static final int RANGE_DIGITS_LENGTH = 3;
focal_class.type: int
focal_class.var_name: RANGE_DIGITS_LENGTH
focal_class.file: http/src/main/java/ro/polak/http/protocol/serializer/impl/RangePartHeaderSerializer.java
focal_class.identifier: RangePartHeaderSerializer
focal_class.interfaces: implements Serializer<RangePartHeader>
focal_class.class_method_signature: RangePartHeaderSerializer.serialize(final RangePartHeader input)
focal_class.full_signature: @Override public String serialize(final RangePartHeader input)
focal_class.identifier: serialize
focal_class.modifiers: @Override public
focal_class.parameters: (final RangePartHeader input)
focal_class.return: String
focal_class.signature: String serialize(final RangePartHeader input)
focal_class.class_method_signature: RangePartHeaderSerializer.serializeLastBoundaryDeliminator(final String boundary)
focal_class.full_signature: public String serializeLastBoundaryDeliminator(final String boundary)
focal_class.identifier: serializeLastBoundaryDeliminator
focal_class.modifiers: public
focal_class.parameters: (final String boundary)
focal_class.return: String
focal_class.signature: String serializeLastBoundaryDeliminator(final String boundary)
focal_class.class_method_signature: RangePartHeaderSerializer.getPartHeadersLength(final List<Range> ranges,
                                       final String boundary,
                                       final String contentType,
                                       final long totalLength)
focal_class.full_signature: public long getPartHeadersLength(final List<Range> ranges,
                                       final String boundary,
                                       final String contentType,
                                       final long totalLength)
focal_class.identifier: getPartHeadersLength
focal_class.modifiers: public
focal_class.parameters: (final List<Range> ranges,
                                       final String boundary,
                                       final String contentType,
                                       final long totalLength)
focal_class.return: long
focal_class.signature: long getPartHeadersLength(final List<Range> ranges,
                                       final String boundary,
                                       final String contentType,
                                       final long totalLength)
focal_method.body: @Override
      public String serialize(final RangePartHeader input) {
          StringBuilder stringBuilder = new StringBuilder();
          stringBuilder.append(DASH_DASH)
                  .append(input.getBoundary())
                  .append(NEW_LINE)
                  .append(Headers.HEADER_CONTENT_TYPE)
                  .append(": ")
                  .append(input.getContentType())
                  .append(NEW_LINE)
                  .append(Headers.HEADER_CONTENT_RANGE)
                  .append(": bytes ")
                  .append(input.getRange().getFrom())
                  .append("-")
                  .append(input.getRange().getTo())
                  .append("/")
                  .append(input.getTotalLength())
                  .append(NEW_LINE)
                  .append(NEW_LINE);
  
          return stringBuilder.toString();
      }
focal_method.class_method_signature: RangePartHeaderSerializer.serialize(final RangePartHeader input)
focal_method.full_signature: @Override public String serialize(final RangePartHeader input)
focal_method.identifier: serialize
focal_method.invocations: append append append append append append append append append append append append append append append append getBoundary getContentType getFrom getRange getTo getRange getTotalLength toString
focal_method.modifiers: @Override public
focal_method.parameters: (final RangePartHeader input)
focal_method.return: String
focal_method.signature: String serialize(final RangePartHeader input)