Fix minor bug in AbstractTest

master
Stuart Boston 11 years ago
parent be963f38a6
commit dc7e8c9600

@ -23,9 +23,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
public class TokenAuthorisation extends AbstractJsonMapping {
/*
* Properties
*/
private static final long serialVersionUID = 2L;
@JsonProperty("expires_at")
private String expires;
@JsonProperty("request_token")

@ -23,9 +23,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
public class TokenSession extends AbstractJsonMapping {
/*
* Properties
*/
private static final long serialVersionUID = 2L;
@JsonProperty("session_id")
private String sessionId;
@JsonProperty("success")

@ -135,7 +135,7 @@ public class AbstractTests {
LOG.info("Reading object from '{}'", filename);
try {
byte[] serObject = FileUtils.readFileToByteArray(serFile);
return SerializationUtils.deserialize(serObject);
return (T) SerializationUtils.deserialize(serObject);
} catch (IOException ex) {
LOG.info("Failed to read {}: {}", filename, ex.getMessage(), ex);
return null;
@ -168,7 +168,7 @@ public class AbstractTests {
assertTrue("Session token is not valid", tokenSession.getSuccess());
// Write the object to a file
writeObject(token, filename);
writeObject(tokenSession, filename);
}
}
return tokenSession.getSessionId();

Loading…
Cancel
Save