SecurityRule implements Serializable { public void setUsername(String username) { this.username = username; }  @PreUpdate @PrePersist void onPreUpdate(); @XmlTransient Long getId(); void setId(Long id); @XmlTransient Resource getResource(); void setResource(Resource resource); @XmlTransient User getUser(); void setUser(User user); @XmlTransient UserGroup getGroup(); void setGroup(UserGroup group); String getUsername(); void setUsername(String username); String getGroupname(); void setGroupname(String groupname); @XmlTransient boolean isCanRead(); void setCanRead(boolean canRead); @XmlTransient boolean isCanWrite(); void setCanWrite(boolean canWrite); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void testMarshallingUsername() throws Exception { SecurityRule sr0 = new SecurityRule(); sr0.setUsername("testuser"); doTheTest(sr0); }