@Test
public void insertObjectInSession() {

    final List<Command> retrieved = kiePMMLSessionUtils.commands;
    assertNotNull(retrieved);
    assertEquals(3, retrieved.size());
    final Object toInsert = "TO_INSERT";
    final String globalName = "GLOBAL_NAME";
    kiePMMLSessionUtils.insertObjectInSession(toInsert, globalName);
    assertEquals(5, retrieved.size());
    assertTrue(retrieved.get(3) instanceof InsertObjectCommand);
    InsertObjectCommand insertObjectCommand = (InsertObjectCommand) retrieved.get(3);
    assertEquals("DEFAULT", insertObjectCommand.getEntryPoint());
    assertNotNull(insertObjectCommand.getObject());
    assertEquals(toInsert, insertObjectCommand.getObject());
    assertTrue(retrieved.get(4) instanceof SetGlobalCommand);
    SetGlobalCommand setGlobalCommand = (SetGlobalCommand) retrieved.get(4);
    assertEquals(globalName, setGlobalCommand.getIdentifier());
    assertEquals(toInsert, setGlobalCommand.getObject());
}