made embeddable jpa entities serializable
added missing unit tests and improved testability