if (!locomotive.checkAddress()) {
throw new InvalidAddressException();
}
if (locomotive.getSession() == null && session == null) {
throw new NoSessionException();
}
if (locomotive.getSession() == null && session != null) {
locomotive.setSession(session);
}
if (locomotive.getGL() == null) {