@Test public void getLastUpdatedUnloaded() { final ZonedDateTime lastUpdated = ZonedDateTime.now(); Mockito.doReturn( lastUpdated ).when( dhisResource ).getLastUpdated(); final AbstractWritableScriptedDhisResource scriptedResource = new AbstractWritableScriptedDhisResource( dhisResource, scriptExecutionContext ) { @Override protected void load() { resource = dhisResource; } }; Assert.assertEquals( lastUpdated, dhisResource.getLastUpdated() ); Mockito.verify( dhisResource ).getLastUpdated(); }
@Nullable public ZonedDateTime getLastUpdated() { return getInternalResource().getLastUpdated(); }
AbstractWritableScriptedDhisResource { @Nullable public ZonedDateTime getLastUpdated() { return getInternalResource().getLastUpdated(); } }
AbstractWritableScriptedDhisResource { @Nullable public ZonedDateTime getLastUpdated() { return getInternalResource().getLastUpdated(); } protected  AbstractWritableScriptedDhisResource( @Nonnull DhisResourceType resourceType, @Nonnull String resourceId, @Nonnull ScriptExecutionContext scriptExecutionContext ); protected  AbstractWritableScriptedDhisResource( @Nonnull DhisResource resource, @Nonnull ScriptExecutionContext scriptExecutionContext ); }
AbstractWritableScriptedDhisResource { @Nullable public ZonedDateTime getLastUpdated() { return getInternalResource().getLastUpdated(); } protected  AbstractWritableScriptedDhisResource( @Nonnull DhisResourceType resourceType, @Nonnull String resourceId, @Nonnull ScriptExecutionContext scriptExecutionContext ); protected  AbstractWritableScriptedDhisResource( @Nonnull DhisResource resource, @Nonnull ScriptExecutionContext scriptExecutionContext ); @Nullable @ScriptMethod( description = "Returns the ID of the DHIS2 resource. Return null if the instance is new." ) String getId(); @Nonnull DhisResourceType getResourceType(); @Nullable DhisResourceId getResourceId(); @ScriptMethod( description = "Returns if the DHIS2 resource is new and has not yet been saved on DHIS2." ) boolean isNewResource(); boolean isLocal(); boolean isDeleted(); @Nullable ZonedDateTime getLastUpdated(); @Nullable String getOrganizationUnitId(); @Nullable ScriptedTrackedEntityInstance getTrackedEntityInstance(); void validate(); }
AbstractWritableScriptedDhisResource { @Nullable public ZonedDateTime getLastUpdated() { return getInternalResource().getLastUpdated(); } protected  AbstractWritableScriptedDhisResource( @Nonnull DhisResourceType resourceType, @Nonnull String resourceId, @Nonnull ScriptExecutionContext scriptExecutionContext ); protected  AbstractWritableScriptedDhisResource( @Nonnull DhisResource resource, @Nonnull ScriptExecutionContext scriptExecutionContext ); @Nullable @ScriptMethod( description = "Returns the ID of the DHIS2 resource. Return null if the instance is new." ) String getId(); @Nonnull DhisResourceType getResourceType(); @Nullable DhisResourceId getResourceId(); @ScriptMethod( description = "Returns if the DHIS2 resource is new and has not yet been saved on DHIS2." ) boolean isNewResource(); boolean isLocal(); boolean isDeleted(); @Nullable ZonedDateTime getLastUpdated(); @Nullable String getOrganizationUnitId(); @Nullable ScriptedTrackedEntityInstance getTrackedEntityInstance(); void validate();  }