package com.bugielmarek.timetable.tests.utils;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

public class TestUtils {

	 
	 public static String createStringWithLength(int length){
		 	StringBuilder sb = new StringBuilder();
		 	for(int i=0; i<length; i++){
		 		sb.append("a");
		 	}
		 	return sb.toString();
	 }
	 
	/* public static byte[] convertObjectToJsonBytes(Object object) throws IOException {
	        ObjectMapper mapper = new ObjectMapper();
	        mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
	        return mapper.writeValueAsBytes(object);
	    }*/
	 
	 public static String asJsonString(Object object) throws JsonProcessingException{
		 ObjectMapper mapper = new ObjectMapper();
		 mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
		 return mapper.writeValueAsString(object);
	 }
}

package com.bugielmarek.timetable.tests.utils;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

public class TestUtils {

	 public static String createStringWithLength(int length){
		 	StringBuilder sb = new StringBuilder();
		 	for(int i=0; i<length; i++){
		 		sb.append("a");
		 	}
		 	return sb.toString();
	 }
	 
	 public static String asJsonString(Object object) throws JsonProcessingException{
		 ObjectMapper mapper = new ObjectMapper();
		 mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
		 return mapper.writeValueAsString(object);
	 }
}

Delete byte[] method, was superfluous
Delete byte[] method, was superfluous
