@Test
public void testGetProperty() throws Exception {

    PropertyAccessor delegate = mock(PropertyAccessor.class);
    PropertyAccessor testable = new SystemPropertyAccessor(delegate);
    System.setProperty("testable", "testvalue");
    assertEquals(testable.getProperty("testable", null, String.class), "testvalue");
    assertEquals(testable.getProperty("testable", "defaultValue", String.class), "testvalue");
    assertEquals(testable.getProperty("pirospaprika", "voroshagyma", null), "voroshagyma");
    assertEquals(testable.getProperty("pirospaprika", "voroshagyma", Object.class),
            "voroshagyma");
    verifyZeroInteractions(delegate);
    assertNull(testable.getProperty(null, null, null));
    verify(delegate, times(1)).getProperty(null, null, null);
    assertNull(testable.getProperty("testable", 1, null));
    verify(delegate, times(1)).getProperty("testable", 1, null);
    assertNull(testable.getProperty("testable", null, Integer.class));
    verify(delegate, times(1)).getProperty("testable", null, Integer.class);
}