Serialization/Deserialization with Generics in Java I've Implemented a Serialization Utility which Serializes/DeSerializes a class, along with writing JUnit Test Cases for the same.

Please Review the code and Suggest me how to improve it. Particularly in generics as I've not written much code with Generics in java.

SerializableEmployee.java - Class to be Serialized  

public class SerializableEmployee implements Serializable{

    /**
     * This Serial version UID will change once any new version of class has been created
     */
    private static final long serialVersionUID = 1L;

    private String name;

    public SerializableEmployee(String name) {
        this.name = name;
    }

    public String getName(){
        return name;
    }

    @Override
    public String toString() {
        return "SerializableEmployee{" +
                "name='" + name + '\'' +
                '}';
    }
}


SerializationUtil.java - Util for Serializing and Deserializing

/**
 * Created by shashi on 21/12/15.
 *
 * @param &lt;T&gt; Type of class to Serialize and Deserialize from
 */
public class SerializationUtil&lt;T&gt; {

    /**
     * Logger for the class
     */
    public Logger LOG = LoggerFactory.getLogger("WHAT to Write here instead of T.class");

    /**
     * Serializes the given {@link T} object and save it into a file
     * @param type {@link T} object to be Serialized
     * @param fileName File in which {@link T} object is to be saved
     *
     * @return boolean specifying if {@link T} object has been serialized
     */
    public boolean serialize(T type, String fileName) {

        try(FileOutputStream fileStream = new FileOutputStream(fileName);
                ObjectOutputStream objectStream = new ObjectOutputStream(fileStream)) {
            objectStream.writeObject(type);
        }catch(IOException inputOutputException){
            LOG.error("Exception Occurred while Serializing {}. Message is ", "WHAT to Write here instead of T.class", inputOutputException.getMessage());

            return false;
        }

        return true;
    }

    /**
     * De-Serializes the given {@link T} object from the given file
     * @param fileName File from which {@link T} object has to be retrieved
     *
     * @return deserialized {@link T} object from the file
     */
    public T deSerialize(String fileName) {

        T employee = null;
        try(FileInputStream fileStream = new FileInputStream(fileName);
            ObjectInputStream objectStream = new ObjectInputStream(fileStream)) {
            employee = (T)objectStream.readObject();
        }catch(IOException | ClassNotFoundException inputOutputException){
            LOG.error("Exception Occurred while Serializing {}. Message is ", "WHAT to Write here instead of T.class", inputOutputException.getMessage());
        }

        return employee;
    }
}


SerializationUtilTest.java - jUnit Test cases for SerializationUtil class

/**
 * Created by shashi on 21/12/15.
 */
public class SerializationUtilTest {

    // Employee to Deserialize
    private static SerializableEmployee employee;
    // De-Serialized Employee
    private static SerializableEmployee deSerializedEmployee;

    // Utility class for Serialization
    private static SerializationUtil&lt;SerializableEmployee&gt; serializationUtil;

    // Provide Abstraction for Constants used
    interface Constants {
        String EMP_NAME = "Shashi";
        String FILE_NAME = "Emp-File";
    }

    @Before
    public void setUp(){
        employee = new SerializableEmployee(Constants.EMP_NAME);

        serializationUtil = new SerializationUtil&lt;SerializableEmployee&gt;();

        serializationUtil.serialize(employee, Constants.FILE_NAME);
        deSerializedEmployee = serializationUtil.deSerialize(Constants.FILE_NAME);
    }

    @Test
    public void employeeNotNullTest(){
        assertTrue(deSerializedEmployee != null);
    }

    @Test
    public void employeeNameEqualTest(){
        assertTrue(Constants.EMP_NAME.equals(deSerializedEmployee.getName()));
    }
}
SerializationUtil should work on T extends Serializable instead of T. This makes misuse harder.
Prefixing serializable to a data-holder is unnecessary for almost all intents and purposes.
You may be interested in operating on Path instead of String when Serializing and deSerializing
Your Util does not provide a way to serialize multiple instances of the same class :/