@Test public void plain() throws Exception { Mock mock = new Mock(plain("Hello, world!")); assertThat(mock.apply(), is("Hello, world!")); }
public final String apply() { nameBuffer.clear(); for (int i = 0; i < formatters.length; i++) { Text text = formatters[i].representation; nameBuffer.append(text.getBytes(), 0, text.getLength()); } return nameBuffer.toString(); }
StringTemplate implements WritableRawComparable { public final String apply() { nameBuffer.clear(); for (int i = 0; i < formatters.length; i++) { Text text = formatters[i].representation; nameBuffer.append(text.getBytes(), 0, text.getLength()); } return nameBuffer.toString(); } }
StringTemplate implements WritableRawComparable { public final String apply() { nameBuffer.clear(); for (int i = 0; i < formatters.length; i++) { Text text = formatters[i].representation; nameBuffer.append(text.getBytes(), 0, text.getLength()); } return nameBuffer.toString(); } protected  StringTemplate(FormatSpec... specs); }
StringTemplate implements WritableRawComparable { public final String apply() { nameBuffer.clear(); for (int i = 0; i < formatters.length; i++) { Text text = formatters[i].representation; nameBuffer.append(text.getBytes(), 0, text.getLength()); } return nameBuffer.toString(); } protected  StringTemplate(FormatSpec... specs); abstract void set(Object object); final String apply(); @Override final void write(DataOutput out); @Override final void readFields(DataInput in); @Override final int getSizeInBytes(byte[] buf, int offset); @Override final int compareInBytes(byte[] b1, int o1, byte[] b2, int o2); @Override final int compareTo(WritableRawComparable o); @Override final int hashCode(); @Override final boolean equals(Object obj); }
StringTemplate implements WritableRawComparable { public final String apply() { nameBuffer.clear(); for (int i = 0; i < formatters.length; i++) { Text text = formatters[i].representation; nameBuffer.append(text.getBytes(), 0, text.getLength()); } return nameBuffer.toString(); } protected  StringTemplate(FormatSpec... specs); abstract void set(Object object); final String apply(); @Override final void write(DataOutput out); @Override final void readFields(DataInput in); @Override final int getSizeInBytes(byte[] buf, int offset); @Override final int compareInBytes(byte[] b1, int o1, byte[] b2, int o2); @Override final int compareTo(WritableRawComparable o); @Override final int hashCode(); @Override final boolean equals(Object obj); static final StringTemplate EMPTY; }