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 { public class TokenAuthorisation extends AbstractJsonMapping {
/* private static final long serialVersionUID = 2L;
* Properties
*/
@JsonProperty("expires_at") @JsonProperty("expires_at")
private String expires; private String expires;
@JsonProperty("request_token") @JsonProperty("request_token")

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

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

Loading…
Cancel
Save