Exemplo n.º 1
0
  @Test
  public void doesNotApplyToNonNullValue() throws Exception {
    final boolean result = NullSerializer.INSTANCE.applies("foo");

    assertThat(result, is(false));
  }
Exemplo n.º 2
0
  @Test
  public void serializesNullAsString() throws Exception {
    final String result = NullSerializer.INSTANCE.serialize(null);

    assertThat(result, is("null"));
  }
Exemplo n.º 3
0
  @Test
  public void appliesToNullValue() throws Exception {
    final boolean result = NullSerializer.INSTANCE.applies(null);

    assertThat(result, is(true));
  }