@Test public void testSetClassName() { String className = "clazz"; String method = "method"; String fileName = "file.java"; int lineNumber = 42; Frame frame = new Frame(className, method, fileName, lineNumber); assertThat(frame.getClassName(), equalTo(className)); assertThat(frame.getMethodName(), equalTo(method)); assertThat(frame.getFileName(), equalTo(fileName)); assertThat(frame.getLineNumber(), equalTo(lineNumber)); assertThat(frame.isUnknown(), is(false)); assertThat(frame.isNative(), is(false)); className = "clazz2"; frame.setClassName(className); assertThat(frame.getClassName(), equalTo(className)); assertThat(frame.getMethodName(), equalTo(method)); assertThat(frame.getFileName(), equalTo(fileName)); assertThat(frame.getLineNumber(), equalTo(lineNumber)); assertThat(frame.isUnknown(), is(false)); assertThat(frame.isNative(), is(false)); }
public void setClassName(String className) throws IllegalArgumentException { this.className = className; }
Frame { public void setClassName(String className) throws IllegalArgumentException { this.className = className; } }
Frame { public void setClassName(String className) throws IllegalArgumentException { this.className = className; } Frame(String className, String methodName);  Frame(String className, String methodName, String fileName, int lineNumber); }
Frame { public void setClassName(String className) throws IllegalArgumentException { this.className = className; } Frame(String className, String methodName);  Frame(String className, String methodName, String fileName, int lineNumber); String getClassName(); void setClassName(String className); String getMethodName(); void setMethodName(String methodName); String getFileName(); int getLineNumber(); void setLocation(String fileName, int lineNumber); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString(); boolean isNative(); boolean isUnknown(); }
Frame { public void setClassName(String className) throws IllegalArgumentException { this.className = className; } Frame(String className, String methodName);  Frame(String className, String methodName, String fileName, int lineNumber); String getClassName(); void setClassName(String className); String getMethodName(); void setMethodName(String methodName); String getFileName(); int getLineNumber(); void setLocation(String fileName, int lineNumber); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString(); boolean isNative(); boolean isUnknown(); static final int IS_NATIVE; static final int IS_UNKNOWN; }